forked from hunterhug/goa.c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
722 additions
and
661 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# 编程智商题 | ||
|
||
此章节主要是用来收集一些有趣的编程题。很多公司面试,最喜欢出这种智商题了。 | ||
|
||
大部分都可以来自各大刷题平台,比如: `LeetCode`。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# 不常见算法 | ||
|
||
有很多算法,不是很常见,很多教程也不会讲。 | ||
|
||
在此章节,我们会尽量收集一些经常使用(可能你天天在用,但是你却不知道),但是不那么常见的算法。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
# B树及B+树 | ||
|
||
`B` 树的命名来自其英语称谓 `Balance Tree`,也就是平衡树的意思。红黑树章节介绍的 `2-3` 树和 `2-3-4` 树都是 `B` 树。 | ||
## 一、B树 | ||
|
||
`B` 树是一种多路查找平衡树,其命名来自英语称谓 `Balance Tree`,也就是平衡树的意思。 | ||
|
||
一棵 `M` 阶 `B` 树的定义为: | ||
|
||
1. 树中每个结点最多含有 `M` 棵子树,`M-1` 个值。 | ||
2. 若根结点不是叶子结点,则至少有2棵子树。 | ||
3. 除根结点之外的所有非叶子结点至少有 `[m/2]`(向下取整) 棵子树。 | ||
4. 每个结点包含的值,值是从小到大排序,子树的大小们也都是介于这些值之间。 | ||
|
||
可以参考 `2-3` 树或 `2-3-4` 树,红黑树章节介绍的 `2-3` 树和 `2-3-4` 树都是 `B` 树,一个是3阶,一个是4阶。 |
Oops, something went wrong.