题目:Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, exc...
分类:
编程语言 时间:
2015-06-19 11:45:05
阅读次数:
124
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-06-19 10:12:00
阅读次数:
128
题目来自于:
https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
这一题目其实我想说的还不是我的代码,是之前在写代码中遇到的一个bug问题。后面会进行详细的解释
Construct Binary Tree from Preorder and Inord...
分类:
其他好文 时间:
2015-06-19 01:34:03
阅读次数:
146
leetcode 226: Invert Binary Tree
python java c++...
分类:
其他好文 时间:
2015-06-19 01:33:32
阅读次数:
140
选择 Learning Scala这本书,两百多页,足够薄。安装http://www.scala-lang.org/ 下载Binary的版本。bin里边有所有操作系统下运行的可以运行的交互式shell ,Scala中叫做RPEL。交互界面很像python和Ruby 很容易上手。Scala是强类型语言...
分类:
其他好文 时间:
2015-06-19 01:23:26
阅读次数:
240
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.
For example, given the following matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0...
分类:
其他好文 时间:
2015-06-19 00:02:50
阅读次数:
170
(1)定义学生类,其中包含学号、姓名、C++课、高数和英语成绩及总分数据成员,成员函数根据需要确定。
(2)读入学生的成绩,并求出总分,用对象数组进行存储。ASCII文件score.dat中保存的是100名学生的学号、姓名和C++课、高数和英语成绩。
(3)将所有数据保存到一个二进制文件binary_score.dat中,最后通过键盘输入你的信息,并写入到文件中(咱不谦虚,三科全100分,...
分类:
其他好文 时间:
2015-06-18 22:14:49
阅读次数:
105
struct TreeNode* invertTree(struct TreeNode* root){ if ( NULL == root ) { return NULL; } if ( NULL == root->left && NULL == root->r...
分类:
其他好文 时间:
2015-06-18 21:33:27
阅读次数:
106
git 在fetch时侯报错: fatal: git-write-tree: error building trees 解决办法: Use: git reset--mixed instead of?git reset --hard. You will not lose any changes. clone代码 git clone http://sunhuairu...
分类:
其他好文 时间:
2015-06-18 20:23:05
阅读次数:
123