题目:Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function...
分类:
其他好文 时间:
2014-07-07 00:14:37
阅读次数:
186
题目: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).You are given a target valu...
分类:
其他好文 时间:
2014-07-06 23:34:53
阅读次数:
273
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-07-05 19:10:48
阅读次数:
219
题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo...
分类:
其他好文 时间:
2014-07-03 20:58:08
阅读次数:
248
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
分类:
其他好文 时间:
2014-07-03 19:10:40
阅读次数:
201
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-07-03 18:57:04
阅读次数:
193
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
分类:
其他好文 时间:
2014-07-03 18:55:48
阅读次数:
236
[LeetCode]Merge Two Sorted Lists...
分类:
其他好文 时间:
2014-07-03 16:37:12
阅读次数:
181
[LeetCode]Remove Duplicates from Sorted List...
分类:
其他好文 时间:
2014-07-03 16:00:08
阅读次数:
202
题目:Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ...
分类:
其他好文 时间:
2014-07-03 12:10:12
阅读次数:
191