题意:
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recursive solution is trivial, could you do it iteratively?...
分类:
其他好文 时间:
2014-11-08 13:41:21
阅读次数:
155
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-11-07 23:12:58
阅读次数:
238
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:
其他好文 时间:
2014-11-07 09:43:14
阅读次数:
211
Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ...
分类:
其他好文 时间:
2014-11-07 00:58:54
阅读次数:
259
openssl pkcs12 -in Certificates.p12 -out Certificates.pem -nodes...
分类:
其他好文 时间:
2014-11-06 17:31:12
阅读次数:
162
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi...
分类:
其他好文 时间:
2014-11-06 14:30:36
阅读次数:
151
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-11-06 12:57:50
阅读次数:
176
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:
其他好文 时间:
2014-11-06 12:33:23
阅读次数:
117
Create a Certificate Authority private key (this is your most important key):$ openssl req -new -newkey rsa:1024 -nodes -out ca.csr -keyout ca.keyCrea...
分类:
其他好文 时间:
2014-11-05 22:48:08
阅读次数:
230
DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edg...
分类:
其他好文 时间:
2014-11-05 16:44:11
阅读次数:
137