Description:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous s...
分类:
其他好文 时间:
2015-06-20 16:53:04
阅读次数:
79
Description:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in whi...
分类:
其他好文 时间:
2015-06-20 16:52:12
阅读次数:
90
Description:Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Co...
分类:
其他好文 时间:
2015-06-20 15:39:21
阅读次数:
108
Description:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Cod...
分类:
其他好文 时间:
2015-06-20 15:37:46
阅读次数:
113
Description: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...
分类:
其他好文 时间:
2015-06-20 15:36:39
阅读次数:
120
Description:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to r...
分类:
其他好文 时间:
2015-06-20 15:33:52
阅读次数:
99
题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired byt...
分类:
编程语言 时间:
2015-06-20 13:10:12
阅读次数:
429
依赖jar:import org.apache.commons.codec.binary.Base64;BASE64和其他相似的编码算法通常用于转换二进制数据为文本数据,其目的是为了简化存储或传输。更具体地说,BASE64算法主要用于转换二进 制数据为ASCII字符串格式。Java语言提供了一个非常...
分类:
其他好文 时间:
2015-06-20 13:04:01
阅读次数:
102
简介有一个平衡二叉树:红黑树(Red Black Tree),由红黑树Rudolf Bayer至1972明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑树。红...
分类:
其他好文 时间:
2015-06-20 11:52:39
阅读次数:
240
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...
分类:
其他好文 时间:
2015-06-20 11:44:06
阅读次数:
82