Follow up for problem "Populating Next Right Pointers in Each Node".
What if the given tree could be any binary tree? Would your previous solution still work?
Note:
You may only use constant extra ...
分类:
其他好文 时间:
2014-12-05 22:48:46
阅读次数:
139
EntityFramework 7 开发纪录http://www.cnblogs.com/xishuai/archive/2014/11/28/ef7-develop-note.html
分类:
其他好文 时间:
2014-12-05 22:39:13
阅读次数:
185
3SumGiven an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:El...
分类:
其他好文 时间:
2014-12-05 22:38:12
阅读次数:
250
Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onlyO(...
分类:
其他好文 时间:
2014-12-05 19:14:53
阅读次数:
131
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
基本思想和知道前序与中序的思想一样,中序的某一节点的左节点一定是该节点的左子树,而后序遍历的某一节点的左节点一定...
分类:
其他好文 时间:
2014-12-05 17:36:45
阅读次数:
116
【题目】
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n = 4,
return 1->4->3->2->5->NULL.
Note:
Given m, n s...
分类:
其他好文 时间:
2014-12-05 17:31:22
阅读次数:
143
SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must...
分类:
其他好文 时间:
2014-12-05 12:23:05
阅读次数:
145
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-12-04 21:25:46
阅读次数:
139
【前记】 最近由于公司系统改造;借用内存库来达到快速响应。公司借用mongodb数据库。下面是学习整理的note 从启动&关闭开始;至于安装这个太简单了。mongodb启动 mongodb服务器启动(跟postgresql数据库启动方式有点类似):是使用mongod命令。至于启动参数;可以...
分类:
数据库 时间:
2014-12-04 19:41:32
阅读次数:
469
Subsets IIGiven a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descend...
分类:
其他好文 时间:
2014-12-04 19:32:41
阅读次数:
163