题目: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...
分类:
编程语言 时间:
2015-01-16 22:14:33
阅读次数:
223
题目:Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't ...
分类:
编程语言 时间:
2015-01-16 22:14:22
阅读次数:
257
题目:
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
...
分类:
编程语言 时间:
2015-01-16 20:58:36
阅读次数:
159
Reverse Linked List II(旋转链表的指定部分)
Leetcode
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2...
分类:
编程语言 时间:
2015-01-16 10:04:19
阅读次数:
203
(http://leetcode.com/2010/11/convert-binary-search-tree-bst-to.html)Convert a BST to a sorted circular doubly-linked list in-place. Think of the left ...
分类:
其他好文 时间:
2015-01-16 08:42:31
阅读次数:
156
The problem:Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2...
分类:
其他好文 时间:
2015-01-16 06:26:58
阅读次数:
190
题目大意:在空地上放置尽可能多机器人,机器人朝上下左右4个方向发射子弹,子弹能穿过草地,但不能穿过墙,两个机器人之间的子弹要保证互不干扰,求所能放置的机器人的最大个数每个机器人所在的位置确定了,那么对应的横向和竖向子弹能到达的空地就全部被覆盖了我们将横向所能连接在一块的空地区域标上同一个标号比如o*...
分类:
其他好文 时间:
2015-01-16 01:10:20
阅读次数:
280
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42744919
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ \...
分类:
其他好文 时间:
2015-01-15 20:23:45
阅读次数:
158
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, reorder it to ...
分类:
其他好文 时间:
2015-01-15 10:57:56
阅读次数:
202
问题描述:
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
...
分类:
其他好文 时间:
2015-01-14 22:54:05
阅读次数:
158