题目: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...
分类:
其他好文 时间:
2015-09-14 16:46:54
阅读次数:
101
/ ? 根目录 /bin??? ?常用的命令 binary file 的目錄 /boot?? 存放系统启动时必须读取的档案,包括核心 (kernel) 在内 ???? ?/boot/grub/menu.lst?? GRUB设置 ???? /boot/vmlinuz?? 内核 ??...
分类:
系统相关 时间:
2015-09-14 15:37:56
阅读次数:
392
Sept. 13, 2015Spent more than a few hours to work on the leetcode problem, and my favorite blogs about this problems:1.http://siddontang.gitbooks.io/l...
分类:
其他好文 时间:
2015-09-14 07:02:38
阅读次数:
138
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...
分类:
其他好文 时间:
2015-09-14 07:02:20
阅读次数:
98
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1解题思路:方法一: recursion 交换当前左右节点,并直接调用递归即可方...
分类:
其他好文 时间:
2015-09-14 07:01:34
阅读次数:
122
Problem:Given a binary tree, count the number of uni-value subtrees.A Uni-value subtree means all nodes of the subtree have the same value.For example...
分类:
其他好文 时间:
2015-09-14 07:01:23
阅读次数:
129
https://leetcode.com/problems/unique-binary-search-trees/动归2015/9/14上午1:37:45分析:二叉搜索树,节点数为N,那么就有根节点为1时,左侧为0个节点,右侧有n-1个节点,这种情况有F(0)*F(n-1);根节点为2时,左侧为1个...
分类:
其他好文 时间:
2015-09-14 06:59:05
阅读次数:
108
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-09-14 01:55:44
阅读次数:
139
Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric...
分类:
其他好文 时间:
2015-09-14 01:53:15
阅读次数:
121
Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:
编程语言 时间:
2015-09-14 00:17:57
阅读次数:
187