Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2014-07-02 22:49:05
阅读次数:
249
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-07-02 22:34:44
阅读次数:
318
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:
其他好文 时间:
2014-07-02 22:13:23
阅读次数:
191
首先创建一张表如下,创建表的方法在上篇介绍过了,这里就不再赘述。添加新数据:INSERT INTO () VALUES ()如:INSERT INTO t_student (student_id,student_name,student_age,student_sex) VALUES (1,'大毛....
分类:
数据库 时间:
2014-07-01 17:40:43
阅读次数:
235
Format characters have the following meaning; the conversion between C and Python values should be obvious given their types. The ‘Standard size’ column refers to the size of the packed value in bytes...
分类:
编程语言 时间:
2014-07-01 14:51:47
阅读次数:
391
1.float类型
float列类型默认长度查不到结果,必须指定精度,
比如 num float, insert into table (num) values (0.12); select * from table where num=0.12的话,empty set。
num float(9,7), insert into table (num) values (0.12); selec...
分类:
数据库 时间:
2014-07-01 11:09:56
阅读次数:
308
/*
* 备忘录模式
*/
#include
//保存值
class mySavevalue
{
public:
mySavevalue(string user_name = "",
int life_value = 100,
int magic_point = 100,
int rank_values =...
分类:
其他好文 时间:
2014-07-01 08:49:27
阅读次数:
203
题目
Given a singly linked list L: L0→L1→…→Ln-1→Ln,
reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…
You must do this in-place without altering the nodes' values.
For example,
Given {1,2,3,4}, re...
分类:
其他好文 时间:
2014-07-01 08:39:24
阅读次数:
181
题目
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recu...
分类:
其他好文 时间:
2014-07-01 07:06:56
阅读次数:
177
题目
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Rec...
分类:
其他好文 时间:
2014-07-01 07:06:11
阅读次数:
214