算法:1.
对root的左子树做处理,让左子树的根节点作为,根节点的右子树,并让右子树作为左子树根节点的右子树的子树2. 递归遍历右子树public void
flatten(TreeNode root) { if(root==null){ return; ...
分类:
其他好文 时间:
2014-05-26 23:39:49
阅读次数:
253
转自:windows下安装,配置gcc编译器1.首先介绍下MinGWMinGW是指只用自由软件来生成纯粹的Win32可执行文件的编译环境,它是Minimalist
GNU on Windows的略称。 实际上 MinGW 并不是一个 单纯的C/C++ 编译器,而是一套 GNU 工具集合。除开 GC....
题目描述:The gray code is a binary numeral system
where two successive values differ in only one bit.Given a non-negative
integernrepresenting the total n...
分类:
其他好文 时间:
2014-05-26 21:30:04
阅读次数:
296
本文是按照IMX283配套光盘的流程重新编译uboot和uImage将光盘中的gcc-4.4.4-glibc-2.11.1-multilib-1.0_EasyARM-iMX283.tar.bz2
解压缩到系统某个文件夹下(我解压缩到/home/host/soft下)然后~/.bashrc添加一行:e...
分类:
其他好文 时间:
2014-05-26 21:05:45
阅读次数:
957
arm-linux-gcc -static -o lcd_show
lcd_show.csudo mount -o loop initrd.img XXX (XXX -- your mount directory)sudo cp
lcd_show XXX/bin/sudo umount XXXsky...
分类:
其他好文 时间:
2014-05-26 14:39:56
阅读次数:
281
http://blog.csdn.net/xlx921027/article/details/17382643
分类:
其他好文 时间:
2014-05-26 13:39:52
阅读次数:
188
原题地址:https://oj.leetcode.com/problems/recover-binary-search-tree/题意:Two
elements of a binary search tree (BST) are swapped by mistake.Recover the
tree...
分类:
编程语言 时间:
2014-05-26 13:25:43
阅读次数:
261
基本上一次过,要注意边界条件的问题:如果在recursion里有两个参数int begin, end,
递归写作recursion(num, mid+1, end), 因为+号的原因,递归中是会出现begin > end
的情况的,所以考虑初始条件的时候应该要考虑充分。 1 /** 2 * Def....
分类:
其他好文 时间:
2014-05-26 12:12:49
阅读次数:
257
Given a strings1, we may represent it as a
binary tree by partitioning it to two non-empty substrings recursively.Below is
one possible representation...
分类:
其他好文 时间:
2014-05-26 11:24:36
阅读次数:
214
H. Happy Reversal
64-bit integer IO format: %lld
Java class name: Main
Elfness is studying in an operation "NOT".
For a binary number A, if we do operation "NOT A", after that, all digit...
分类:
移动开发 时间:
2014-05-23 00:43:49
阅读次数:
430