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
Problem J: TravelingTime Limit:1 SecMemory Limit:32 MBDescriptionSH likes traveling around the world. When he arrives at a city, he will ask the staff...
分类:
其他好文 时间:
2014-06-30 15:23:09
阅读次数:
145
每当我们讨论缓存时,总是会对如下几个词比较熟悉,Write-back, write-through, write-around似乎,缓存主要是为“写”设计的,其实这是错误的理解,写从缓存中获得的好处是非常有限的,缓存主要是为“读”服务的。之所以我们要顺带提一下,在一个缓存系统中,如何处理写的顺序,是...
分类:
其他好文 时间:
2014-06-28 11:13:18
阅读次数:
188
Tote bags are usually described in a general way, but they are really detailed picture of the bear style appearance. These three major reasons define ...
分类:
其他好文 时间:
2014-06-27 17:37:31
阅读次数:
158
题目:Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmet...
分类:
其他好文 时间:
2014-06-20 18:44:41
阅读次数:
279
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-06-18 13:29:31
阅读次数:
214
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
/ 2 2
/ \ / 3 4 4 3
But the f...
分类:
其他好文 时间:
2014-06-15 19:49:35
阅读次数:
176
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...
分类:
其他好文 时间:
2014-06-15 18:55:36
阅读次数:
188
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-06-10 11:51:42
阅读次数:
213