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 value t...
分类:
其他好文 时间:
2014-07-03 22:10:05
阅读次数:
295
Follow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity? How and why?Write a function to...
分类:
其他好文 时间:
2014-07-03 21:59:51
阅读次数:
199
题目: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 two binary trees, write a function to check if they are equal or not.
分类:
其他好文 时间:
2014-07-03 19:26:46
阅读次数:
213
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
题目: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
Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally i...
分类:
其他好文 时间:
2014-07-02 17:56:50
阅读次数:
205