Binary Tree
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 6268
Accepted: 2887
Description
Background
Binary trees are a common data structure in comput...
分类:
其他好文 时间:
2015-04-25 13:45:30
阅读次数:
136
本文展示了Linux 系统下的二进制的makeself 程序的制作——将数据和对数据的操作同时包含在一个巨大的可执行文件当中。...
分类:
其他好文 时间:
2015-04-25 12:14:11
阅读次数:
213
Path Sum IITotal Accepted:41402Total Submissions:155034My SubmissionsQuestionSolutionGiven a binary tree and a sum, find all root-to-leaf paths where ...
分类:
其他好文 时间:
2015-04-24 22:27:17
阅读次数:
159
bin:binary缩写,里面存放的是常用的可执行二进制文件;boot:系统引导文件,包括插件、驱动,包括Linux内核;dev: device缩写,保存计算机上所有底层硬件设备,所有硬件都被抽象为一个文件;etc: 所有与操作系统相关的配置文件都在此处;home: 家目录,每一个用户在家目录里都有...
分类:
系统相关 时间:
2015-04-24 22:19:48
阅读次数:
222
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".看起来挺好写的样子,没想到墨迹了半天。string add(string a, string ...
分类:
其他好文 时间:
2015-04-24 18:59:55
阅读次数:
168
add--Add file contents to the indexbisect--Find by binary search the change that introduced a bugbranch--List, create or delete branchescheckout--Chec...
分类:
其他好文 时间:
2015-04-24 18:43:05
阅读次数:
105
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\ ...
分类:
其他好文 时间:
2015-04-24 12:40:04
阅读次数:
138
Path SumTotal Accepted:50593Total Submissions:169742My SubmissionsQuestionSolutionGiven a binary tree and a sum, determine if the tree has a root-to-l...
分类:
其他好文 时间:
2015-04-24 12:09:15
阅读次数:
95
problem:
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 ...
分类:
其他好文 时间:
2015-04-24 10:35:50
阅读次数:
136
求从根节点到叶子节点的最短路径。【思路】开始想到返回左右子树最短深度,测试发现对于一个根节点带一个孩子节点,其最短路径是2,不是最小深度1,此种特殊情况单独列出。【my code】int minDepth(TreeNode *root) { if(root==NULL) ...
分类:
其他好文 时间:
2015-04-24 08:56:48
阅读次数:
114