摘要: Assume you have an array of length n initialized with all 0's and are given k update operations. Each operation is represented as a triplet: [startInd 阅读全文
posted @ 2016-07-21 14:35 LiBlog 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Design a hit counter which counts the number of hits received in the past 5 minutes. Each function accepts a timestamp parameter (in seconds granulari 阅读全文
posted @ 2016-07-21 14:29 LiBlog 阅读(242) 评论(0) 推荐(0) 编辑
摘要: You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. 阅读全文
posted @ 2016-07-21 13:41 LiBlog 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array without duplicates, return the summary of its ranges. For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"]. Credi 阅读全文
posted @ 2016-07-21 12:36 LiBlog 阅读(120) 评论(0) 推荐(0) 编辑