leetcode
文章平均质量分 68
GIGI丶
这个作者很懒,什么都没留下…
展开
-
LeetCode--Repeated DNA Sequences
Repeated DNA Sequences All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify rep原创 2015-03-11 22:45:44 · 193 阅读 · 0 评论 -
Leetcode 286 : Missing Number
Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, Given nums = [0, 1, 3] return 2. Note: Your algorithm shoul原创 2015-09-02 10:23:32 · 305 阅读 · 0 评论 -
Leetcode 275 : H-Index II
Follow up for H-Index: What if the citations array is sorted in ascending order? Could you optimize your algorithm? 思路:参考H-Index的思路,只是这次不需要再进行排序操作了,复杂度为O(n),代码如下: public int hIndex(int[] citat原创 2015-09-06 19:47:31 · 262 阅读 · 0 评论