Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.The a...
分类:
其他好文 时间:
2014-10-29 18:44:08
阅读次数:
228
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-10-29 16:49:45
阅读次数:
220
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:
其他好文 时间:
2014-10-29 16:41:01
阅读次数:
185
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:
编程语言 时间:
2014-10-29 16:22:58
阅读次数:
209
Given a sorted linked list, delete all duplicates such that each element appear only
once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
输入排序过的链表,删除相同的元素。
...
分类:
其他好文 时间:
2014-10-29 15:02:12
阅读次数:
178
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m +
n) to hold additional elements from B...
分类:
其他好文 时间:
2014-10-29 14:59:27
阅读次数:
180
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:
编程语言 时间:
2014-10-29 12:49:29
阅读次数:
204
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).Find the minimum element.You m...
分类:
其他好文 时间:
2014-10-29 12:24:10
阅读次数:
168
此题要求用归并排序排两个链表,基本思想还是分为分割和合并
合并的代码在Merge Two Sorted List里已经讲得很清楚了。所以这里直接给出代码。...
分类:
其他好文 时间:
2014-10-29 09:15:29
阅读次数:
181
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu...
分类:
其他好文 时间:
2014-10-28 23:51:41
阅读次数:
221