这个问题原本是 C++ 吧里有人问的, 我当时就立刻动手解决了, 结果后来才发现, STL 里已经有了对应的泛型算法了......看来我对 STL 知道的还是太少, 贴一下我当时完成的方法:set VecToSet (const vector &vec){ set tmp_set (vec.c...
分类:
其他好文 时间:
2015-01-31 17:51:02
阅读次数:
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
/ 2 2
/ \ / 3 4 4 3
But the f...
分类:
编程语言 时间:
2015-01-30 09:04:26
阅读次数:
242
/************************************************************************/ /* 37: Symmetric Tree */ /***********************************************.....
分类:
其他好文 时间:
2015-01-27 23:14:19
阅读次数:
234
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-01-27 00:14:03
阅读次数:
145
原题地址有人些的做法是判断中序遍历序列是否是回文串,一开始我觉得挺有道理,但是琢磨了一阵觉得没那么简单。比如下面这个树: 1 / 1 / 1中序遍历序列是"111",虽然是回文串但这棵树明显不是对称的。如果要是把NULL也算进去呢?还是上面...
分类:
其他好文 时间:
2015-01-26 14:55:27
阅读次数:
165
私钥加密(对称加密 symmetric cryptography):私钥加密算法使用单个私钥来加密和解密数据。由于具有密钥的任意一方都可以使用该密钥解密数据,因此必须保护密钥不被未经授权的代理得到。私钥加密又称为对称加密,因为同一密钥既用于加密又用于解密。私钥加密算法非常快(与公钥算法相比),特别适...
分类:
其他好文 时间:
2015-01-22 13:00:35
阅读次数:
230
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 / \ ...
分类:
其他好文 时间:
2015-01-19 00:09:50
阅读次数:
174
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...
分类:
其他好文 时间:
2015-01-14 11:08:56
阅读次数:
154
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 /...
分类:
移动开发 时间:
2015-01-12 22:25:01
阅读次数:
151
The problem:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ...
分类:
其他好文 时间:
2015-01-11 06:09:14
阅读次数:
197