Skip to content

Commit 402bbee

Browse files
authored
Create README.md
1 parent 3932086 commit 402bbee

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

HW2/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Merge Sort
2+
> 將list從中間切為左數列及右數列</br>
3+
並重複執行直到每個數列中只有一個數</br>
4+
接著再講左右數列內的數兩兩比較大小</br>
5+
比較小的先放入新的數列,直到左右數列都放入。
6+
7+
<img src="/pic/mergesort1.jpg" width="400" height="400">
8+
9+
## Heap Sort
10+
> 將原始的數列以Tree的形式排列</br>
11+
先從下到上將每個小樹的root變為那棵樹中最大的(Max Heap)</br>
12+
再把最上面的數取出,填入最後一個樹,從上到下把每個小樹root變為那棵樹中最大的(Sift-Down)</br>
13+
重複上述動作直到數列排列完成。
14+
15+
<img src="/pic/heapsort1.jpg" width="500" height="400" >
16+
17+
## [Merge Sort V.S. Heap Sort](https://github.com/C-WeiYu/WeiYu/blob/master/HW2/Heap%20Sort%26Merge%20Sort%E6%AF%94%E8%BC%83.md)
18+
-[x] 概念
19+
-[x] 程式碼
20+
-[x] 時間複雜度
21+
-[x] 額外空間
22+
-[x] 穩定度
23+
24+
## 歷程
25+
邁入第二次的作業,感覺逐漸能抓到感覺</br>
26+
漸漸找尋到寫code的熱情與成就</br>
27+
開始想辦法挑戰自己的極限。
28+
29+
### 參考資料:
30+
[Merge Sort](http://notepad.yehyeh.net/Content/Algorithm/Sort/Merge/Merge.php)
31+
32+
[Heap Sort](http://www.notepad.yehyeh.net/Content/Algorithm/Sort/Heap/Heap.php)

0 commit comments

Comments
 (0)