摘要: 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)
摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of 阅读全文
posted @ 2017-06-07 22:13 NaiveCoder 阅读(96) 评论(0) 推荐(0)
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2017-06-07 22:01 NaiveCoder 阅读(118) 评论(0) 推荐(0)
摘要: Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18]. 思路 本题要合并重叠 阅读全文
posted @ 2017-06-07 17:14 NaiveCoder 阅读(122) 评论(0) 推荐(0)