题目:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 /...
分类:
编程语言 时间:
2014-07-31 02:28:25
阅读次数:
376
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center)....
分类:
其他好文 时间:
2014-07-30 14:48:53
阅读次数:
216
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2014-07-24 10:04:33
阅读次数:
214
介绍还有一种平衡二叉树:红黑树(Red Black Tree),红黑树由Rudolf Bayer于1972年发明,当时被称为平衡二叉B树(symmetric binary B-trees),1978年被Leonidas J. Guibas和Robert Sedgewick改成一个比較摩登的名字:红黑...
分类:
其他好文 时间:
2014-07-23 15:16:46
阅读次数:
375
set相关算法
------------------------------------------------------------------------------------
描述:
set_union , set_difference , set_intersection , set_symmetric_difference 算法接受的 set ,
必须是有序区间,适用于以 RB-tree 为底层的 set/multiset , 不适用于以 hash 为底层的 hash_set/hash_mul...
分类:
其他好文 时间:
2014-07-22 22:34:33
阅读次数:
214
Recursive.class Solution { public: bool isSymmetric(TreeNode *pl, TreeNode *pr) { if (!pl && !pr) return true; if ((pl && !pr)...
分类:
其他好文 时间:
2014-07-22 00:36:36
阅读次数:
197
B - Symmetric Order(3.3.1)
Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
In your job at Albatross Circus Management (yes, it'...
分类:
其他好文 时间:
2014-07-15 22:43:34
阅读次数:
318
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:...
分类:
其他好文 时间:
2014-07-13 17:13:49
阅读次数:
213
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
分类:
其他好文 时间:
2014-07-03 19:20:42
阅读次数:
189
判断一个二叉树是否是轴对称的是一个经典的算法问题,下面结合leetcode上的Symmetric Tree给出判断对称树的两种方法。
先看看问题描述:
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, t...
分类:
其他好文 时间:
2014-07-02 06:58:05
阅读次数:
208