Skip to content

Commit

Permalink
feature: update articles and resource
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneCheng committed Aug 11, 2023
1 parent fffefcf commit 16b0aa4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/collection/front-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ date: 2022-12-03
- [You Dont Know JS](https://github.com/getify/You-Dont-Know-JS)
- [TC39](https://tc39.es/)
- [2ality – JavaScript and more](https://2ality.com/)
- Brendan Eich(JavaScript 作者):https://brendaneich.com/
- [Mastering Modular JavaScript](https://github.com/mjavascript/mastering-modular-javascript)
- [Practical Modern JavaScript](https://github.com/mjavascript/practical-modern-javascript)

Expand Down
1 change: 1 addition & 0 deletions docs/collection/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ title: 首頁
- NeetCode:https://www.youtube.com/@NeetCode/videos
- x86 assembly:https://ost2.fyi/
- 一家在做 graphQL 相關的公司:https://the-guild.dev/blog
- 一家在做 embedded linux 的公司:https://bootlin.com/

## 🐳 Paper
- REST 原始文章:https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
Expand Down
2 changes: 0 additions & 2 deletions docs/notes/data-structure/stack-and-queue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ class Queue {
- 圖形的 BFS
- binary tree 的 level order traversal

## :whale: 題目練習

## 🐳 Resource

- [Linked List: Intro(簡介)](http://alrightchiu.github.io/SecondRound/linked-list-introjian-jie.html) by Chiu CC
Expand Down
38 changes: 34 additions & 4 deletions docs/notes/data-structure/tree-and-binary-tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,47 @@ flowchart TB

### 🦀 Binary Tree 的三個定理

假設 root level = 1
假設root level = 1,【定理一】:

【定理一】 $The\ i^{th}\ level\ in\ a\ binary\ tree\ has\ at\ most\ 2^{i-1}\ nodes$
$$
The\ i^{th}\ level\ in\ a\ binary\ tree\ has\ at\ most\ 2^{i-1}\ nodes
$$

證明:用數學歸納法

【定理二】
---

假設:root level = 1,【定理二】:

$$
The\ binary\ tree\ with\ height\ H,\ has\ at\ most\ 2^{H}-1\ nodes,\ at\ least\ H\ nodes.
$$

證明:

$$
\begin{align*}
&(1) 最多 nodes,也就是每個節點長好長滿:節點數 = 2^{0} + 2^{1} + ... + 2^{H-1} = \frac{1*(1-2^{H})}{1-2} = 2^{H} - 1\\
&(2) 最少 nodes,也就是每個 level 只有一個節點,所以節點數 = H
\end{align*}
$$

---



### 🦀 Binary Tree 的種類

## 🐳 Tree and Binary Tree 簡單比較
- Skewed Binary Tree
- Full Binary Tree
- Complete Binary Tree
- Strict Binary Tree

### 🦀 Binary Tree Representations

有兩種表示二元樹的方法,分別是用 array 或是 linked list。下面表個是針對這兩種方式的優缺點比較:



## 🐳 Resource

Expand Down

0 comments on commit 16b0aa4

Please sign in to comment.