Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given
1->2->3->3->4->4->5, return
1->2->5.
Given
1...
分类:
其他好文 时间:
2014-11-04 22:55:40
阅读次数:
300
问题描述:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become
4 5 6 7 0 1 2).
Find the minimum element.
You may assume no duplicate exists ...
分类:
其他好文 时间:
2014-11-04 17:26:17
阅读次数:
253
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-11-04 12:28:18
阅读次数:
177
题目描述:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in...
分类:
其他好文 时间:
2014-11-04 09:20:30
阅读次数:
137
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for singly-linked ....
分类:
其他好文 时间:
2014-11-03 23:53:07
阅读次数:
185
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.1,注意从新定义l...
分类:
其他好文 时间:
2014-11-03 08:55:40
阅读次数:
163
题目: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-11-02 23:56:51
阅读次数:
220
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-...
分类:
其他好文 时间:
2014-11-02 13:41:39
阅读次数:
168
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-11-02 12:11:14
阅读次数:
215
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-11-02 07:03:37
阅读次数:
177