Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. Note: Recursive solu ...
分类:
其他好文 时间:
2016-11-07 09:44:09
阅读次数:
176
UniqueIdentifier 数据类型用于存储GUID的值,占用16Byte。 SQL Server将UniqueIdentifier存储为16字节的二进制数值,Binary(16),按照特定的格式显示,显示的格式是:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,其中 ...
分类:
其他好文 时间:
2016-11-06 19:53:55
阅读次数:
236
经常碰到要存一堆的string, 这个时候可以用hash tables, 虽然hash tables 查找很快,但是hash tables不能表现出字符串之间的联系.可以用binary search tree, 但是查询速度不是很理想. 可以用trie, 不过trie会浪费很多空间(当然你也可以用二 ...
分类:
其他好文 时间:
2016-11-06 19:31:13
阅读次数:
210
Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. Note: Recursive sol ...
分类:
其他好文 时间:
2016-11-06 09:34:10
阅读次数:
206
Given preorder and inorder traversal of a tree, construct the binary tree. (Medium) Note:You may assume that duplicates do not exist in the tree. 分析: ...
分类:
其他好文 时间:
2016-11-05 17:59:46
阅读次数:
170
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). (Easy) For example:Given binary ...
分类:
其他好文 时间:
2016-11-05 17:58:10
阅读次数:
138
Given inorder and postorder traversal of a tree, construct the binary tree. (Medium) Note:You may assume that duplicates do not exist in the tree. 分析: ...
分类:
其他好文 时间:
2016-11-05 17:41:21
阅读次数:
153
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). (Eas ...
分类:
其他好文 时间:
2016-11-05 17:39:10
阅读次数:
183
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 l ...
分类:
其他好文 时间:
2016-11-05 17:28:13
阅读次数:
147
Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. Note: Recursive so ...
分类:
其他好文 时间:
2016-11-05 12:04:17
阅读次数:
129