Skip to content

Commit 8ed2133

Browse files
committed
update
1 parent 0cb5398 commit 8ed2133

3 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎_posts/2014-09-01-数据结构笔记.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ tags : [面试,数据结构,笔记,随手记]
99
<h4>{{page.title|remove_first:'Leetcode之'}}</h4>
1010

1111
1. 二叉树度为2的点有$n_2$个,叶子节点有$n_0$个。证明$n_0==n_2+1$。
12+
1213
证明:总结点个数$n=n_0+n_1+n2$,边的数目为$B=n-1$。度为2的结点贡献出2条边,度为1的结点贡献出1条边。又有$B=n_2+n_1$。
1314
结合上述式子,化简得证。
1415

‎_posts/2014-09-13-笔试面试总结.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ tags : [面试,Java,笔记,随手记,笔试题]
2727
解:之前经常遇到的题是求 [和值最大的连续子数组](http://blog.csdn.net/cynhafa/article/details/6990735),被思维定式了。
2828

2929
这题先求出前缀和数组`sum[i]`表示`0-i`项的和。
30-
然后附上下标信息对`sum`进行排序,两两计算,最接近0的子数组肯定在其中出现。(因为'sum[i]-sum[j]` 即是 `j-i`项连续子数组的和)。
30+
然后附上下标信息对`sum`进行排序,两两计算,最接近0的子数组肯定在其中出现。(因为`sum[i]-sum[j]` 即是 `j-i`项连续子数组的和)。
3131

3232
4. 包含特定的字符集的最短子串。如字符集是`abc`,`text ="cacdbe"`,那么`text`中包含`abc`的最短子串是`acdb`。
3333

0 commit comments

Comments
 (0)