上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 36 下一页
摘要: A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The 阅读全文
posted @ 2016-07-28 14:05 LiBlog 阅读(384) 评论(0) 推荐(0) 编辑
摘要: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or 阅读全文
posted @ 2016-07-24 12:38 LiBlog 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Design a simplified version of Twitter where users can post tweets, follow/unfollow another user and is able to see the 10 most recent tweets in the u 阅读全文
posted @ 2016-07-24 11:30 LiBlog 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-07-22 14:45 LiBlog 阅读(196) 评论(0) 推荐(0) 编辑
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2016-07-22 14:13 LiBlog 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑
摘要: Given a data stream input of non-negative integers a1, a2, ..., an, ..., summarize the numbers seen so far as a list of disjoint intervals. For exampl 阅读全文
posted @ 2016-07-20 14:38 LiBlog 阅读(143) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 36 下一页