摘要: 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"]. 这个题目不 阅读全文
posted @ 2017-06-08 21:58 NaiveCoder 阅读(91) 评论(0) 推荐(0)
摘要: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except  阅读全文
posted @ 2017-06-08 20:51 NaiveCoder 阅读(110) 评论(0) 推荐(0)
摘要: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo 阅读全文
posted @ 2017-06-08 20:16 NaiveCoder 阅读(129) 评论(0) 推荐(0)
摘要: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space. 第一 阅读全文
posted @ 2017-06-08 16:45 NaiveCoder 阅读(130) 评论(0) 推荐(0)
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2017-06-08 15:53 NaiveCoder 阅读(93) 评论(0) 推荐(0)
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2017-06-08 11:57 NaiveCoder 阅读(162) 评论(0) 推荐(0)
摘要: LeetCode汇总 阅读全文
posted @ 2017-06-08 09:02 NaiveCoder 阅读(183) 评论(0) 推荐(0)