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
来源: Cyber Security Challenge 2015 题目:Crackme 类型: Reverse 分数: 120 难度:中(难中易三个级别) 描述: We found this binary, but we lost the password. Please retrieve it ...
分类:
其他好文 时间:
2015-04-24 06:37:38
阅读次数:
153
/* 题意:把一个有序的数组转化成平衡二叉树 解法:递归*//** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; *...
分类:
其他好文 时间:
2015-04-23 23:26:09
阅读次数:
180