Two elements of a binary search tree (BST) are
swapped by mistake.Recover the tree without changing its structure.Note:A
solution using O(n) space is ...
分类:
其他好文 时间:
2014-05-17 11:30:21
阅读次数:
247
5道题目分别是:【Interleaving String】、【Validate Binary Search Tree】、【Sqrt(x) 】、【Recover Binary Search Tree 】、【Climbing Stairs 】,由于有一些题目不需要发一整篇博文来记录,所以就将这些题目以一篇博文5道来记录。...
分类:
其他好文 时间:
2014-05-15 06:30:55
阅读次数:
301
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Same Tree
Total Accepted: 15922 Total
Submissions: 38418
Given two binary trees, write a function to check if they are equal o...
分类:
其他好文 时间:
2014-05-14 01:15:40
阅读次数:
293
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Symmetric Tree
Total Accepted: 13991 Total
Submissions: 44240
Given a binary tree, check whether it is a mirror of itself ...
分类:
其他好文 时间:
2014-05-14 00:52:07
阅读次数:
372
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official
Snapshot i386 LIVE/INSTALL Binary 20130905-08:50]/ kali contrib main non-free
#deb cdrom:[Debian G...
分类:
其他好文 时间:
2014-05-13 17:28:37
阅读次数:
334
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie
Unique Binary Search Trees
Total Accepted: 13478 Total
Submissions: 37858
Given n, how many structurally unique BST's (bin...
分类:
其他好文 时间:
2014-05-13 15:21:22
阅读次数:
291
HITAG S--3rd generation HITAG? familyModulation
Read/Write Device to Transponder: 100 % ASK and Binary Pulse Length
CodingModulation Transponder to Re...
分类:
其他好文 时间:
2014-05-13 11:09:10
阅读次数:
336
转自:http://binary.duapp.com/2012/10/275.html1、sae上传了war后不报错,却出现一片空白:原因:上传war包不能包含servlet-api和xmlsec相关jar包详情参看:http://sae.sina.com.cn/?m=devcenter&catId...
分类:
编程语言 时间:
2014-05-13 09:57:02
阅读次数:
360
二进制相加,本质上就是大整数加法,有关大整数加法我的舍友教过我一个很好的方法,先用一个int数组保存结果,将两个数对应位置相加,全部加完后,再统一处理进位的问题。这个方法同样适用于大整数的乘法。
这个题没什么特别的,注意一下进位别搞错了就行了,还有其实不用像我写的这么麻烦,可以一开始先判断哪个更长一些,交换一下。代码会简洁很多。class Solution {
public:
strin...
分类:
其他好文 时间:
2014-05-13 08:02:00
阅读次数:
239
原题地址:http://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/题意:将一条排序好的链表转换为二叉查找树,二叉查找树需要平衡。解题思路:两个思路:一,可以使用快慢指针来找到中间的那个节点,然后将这个节点作为...
分类:
编程语言 时间:
2014-05-12 21:07:00
阅读次数:
405