Given a strings1, we may represent it as a
binary tree by partitioning it to two non-empty substrings recursively.Below is
one possible representation...
分类:
其他好文 时间:
2014-06-04 20:11:38
阅读次数:
303
Follow up for "Unique Paths":Now consider if
some obstacles are added to the grids. How many unique paths would there be?An
obstacle and empty space i...
分类:
其他好文 时间:
2014-06-04 19:54:55
阅读次数:
258
Given two binary strings, return their sum
(also a binary string).For example,a ="11"b
="1"Return"100".classSolution{public:stringaddBinary(stringa,st...
分类:
其他好文 时间:
2014-06-04 19:23:09
阅读次数:
235
The gray code is a binary numeral system where
two successive values differ in only one bit.Given a non-negative
integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-04 18:58:39
阅读次数:
277
Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identical an...
分类:
其他好文 时间:
2014-06-04 18:37:18
阅读次数:
277
Given a binary tree, determine if it is a valid
binary search tree (BST).Assume a BST is defined as follows:The left subtree of
a node contains only n...
分类:
其他好文 时间:
2014-06-03 14:00:56
阅读次数:
281
Two elements of a binary search tree (BST) are
swapped by mistake.Recover the tree without changing its structure.Note:A
solution using O(n) space is ...
分类:
其他好文 时间:
2014-06-03 13:53:21
阅读次数:
309
Given two binary strings, return their sum
(also a binary string).For example,a ="11"b ="1"Return"100".class Solution
{public: string addBinary(str...
分类:
其他好文 时间:
2014-05-30 08:39:11
阅读次数:
270
jQuery EasyUI Tree Create from HTML markup Folder
Sub Folder 1 File 11 File 12 File 13 File 2 File 3 File 4 File 5 ...
分类:
Web程序 时间:
2014-05-29 17:48:25
阅读次数:
473
红黑树(Red-Black
Tree)红黑树是一种BST,但是每个节点上增加一个存储位表示该节点的颜色(R或者B);通过对任何一条从root到leaf的路径上节点着色方式的显示,红黑树确保所有路径的差值不会超过一倍,最终使得BST接近平衡;红黑树内每个节点包含五个属性:color,
key, lef...
分类:
数据库 时间:
2014-05-29 16:51:27
阅读次数:
400