题目如下:
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:
The left subtree of a node contains only nodes with keys less than the node's k...
分类:
其他好文 时间:
2015-08-01 01:09:59
阅读次数:
109
4.3 Given a sorted (increasing order) array with unique integer elements, write an algorithm to create a binary search tree with minimal height.这道题给了我...
分类:
其他好文 时间:
2015-08-01 01:03:53
阅读次数:
118
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wikipedia: ...
分类:
其他好文 时间:
2015-07-31 21:39:07
阅读次数:
105
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2015-07-31 18:00:55
阅读次数:
82
UTF-8是现在流行的编码方式,下面是RFC2279对UTF-8编码规则的规定
UCS-4 range (hex.) UTF-8 octet sequence (binary)
0000 0000-0000 007F 0xxxxxxx
0000 0080-0000 07FF 110xxxxx 10xxxxxx
0000 0800-0000 ...
分类:
其他好文 时间:
2015-07-31 16:23:54
阅读次数:
129
下数据类型不能包括在列存储索引中: ·binary和varbinary ·ntext、text和 image ·varchar(max)和nvarchar(max) ·uniqueidentifier ·rowversion(和 timestamp) ·sql_variant ·精度大...
分类:
数据库 时间:
2015-07-31 16:10:44
阅读次数:
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...
分类:
其他好文 时间:
2015-07-31 16:08:47
阅读次数:
103
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Analyse: the core idea of this problem is...
分类:
其他好文 时间:
2015-07-31 12:52:11
阅读次数:
108
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired bythis...
分类:
其他好文 时间:
2015-07-31 12:44:20
阅读次数:
93
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Analyse: Using binary search to divide the sorted arr...
分类:
其他好文 时间:
2015-07-31 12:19:02
阅读次数:
102