Skip to content

Commit

Permalink
update 240321 ver1
Browse files Browse the repository at this point in the history
  • Loading branch information
V1CeVersaa committed Mar 21, 2024
1 parent 35eada5 commit 17e5705
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@

ProblemSet.md
13 changes: 9 additions & 4 deletions docs/Computer Science/Algorithm/03 Trees.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@

**Descendants of a node**: all nodes in its subtrees.

Every tree can be transformed into a binary tree with **FirstChild-NextSibling** representation.

## 3.1 Binary Trees

A **binary tree** is a tree in which no node can have more than two children.

**Expression Trees**: a binary tree used to represent expressions. Intresting.

### 3.1.1 Node Implementation

```C
Expand Down Expand Up @@ -154,9 +158,10 @@ typedef struct TreeNode {

=== "Inorder & Iterative"

```C
void iter_inOrder(TreeNode *root, int *size) {
什么?你还想折磨自己?

你需要在循环里边手动建一个堆栈来模仿系统堆栈的行为,想想都觉得受不了,消停写你的递归版得了。

}
```
## 3.2 Binary Search Trees

blinksmoblinkblinkphapphasd

0 comments on commit 17e5705

Please sign in to comment.