LeetCode: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ...
分类:
其他好文 时间:
2014-08-26 22:57:46
阅读次数:
220
Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ...
分类:
其他好文 时间:
2014-08-26 17:17:06
阅读次数:
133
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-08-16 22:23:31
阅读次数:
269
Given a binary tree, flatten it to a linked list in-place....
分类:
其他好文 时间:
2014-08-16 12:39:00
阅读次数:
136
Problem Description:
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree sho...
分类:
其他好文 时间:
2014-08-15 10:43:28
阅读次数:
198
(define (range n) (define (recur n) (if (= n -1) '() (cons n (recur (- n 1))))) (recur (- n 1)))(define (flatten a)...
分类:
其他好文 时间:
2014-08-12 16:24:34
阅读次数:
183
http://www.geeksforgeeks.org/amazon-interview-set-107/F2F-I:1) Brief discussion on work in current company2) Flatten linked list – http://www.geeksfor...
分类:
其他好文 时间:
2014-08-08 06:22:45
阅读次数:
375
The Flat Dictionary原来的代码没处理dict为空的情况 1 def flatten(dictionary): 2 #[] is a list 3 #() is a tuple 4 stack = [((), dictionary)] 5 6 res...
分类:
其他好文 时间:
2014-08-05 11:05:59
阅读次数:
204
Given a binary tree, flatten it to a linked list in-place.For example, Given 1 / \ 2 5 / \ \ 3 4 6The flattened ...
分类:
其他好文 时间:
2014-08-04 16:59:37
阅读次数:
246
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:
其他好文 时间:
2014-07-29 14:07:58
阅读次数:
163