Skip to content

Commit 323f500

Browse files
authored
Update Heap.md
1 parent 00d497e commit 323f500

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

β€ŽData Structure/Heap.mdβ€Ž

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
μ‚­μ œ : O(logN)
3434

3535

36+
![image](https://github.com/yeoseojeong/cpp-study/assets/121150215/47db9c8c-5ee8-4b68-b2c6-9aebfe8f2345)
37+
38+
---
39+
3640
### λΆ€λͺ¨ λ…Έλ“œμ™€ μžμ‹ λ…Έλ“œμ˜ 관계
3741

3842
**μ™Όμͺ½ μžμ‹ index :** (λΆ€λͺ¨ index) * 2
@@ -42,9 +46,22 @@
4246
**λΆ€λͺ¨ index :** (μžμ‹ index) / 2
4347

4448

45-
![image](https://github.com/yeoseojeong/cpp-study/assets/121150215/47db9c8c-5ee8-4b68-b2c6-9aebfe8f2345)
4649

47-
---
50+
51+
### νž™μ˜ μ‚½μž…
52+
53+
νž™μ— μƒˆλ‘œμš΄ μš”μ†Œκ°€ λ“€μ–΄μ˜€λ©΄, 일단 μƒˆλ‘œμš΄ λ…Έλ“œλ₯Ό νž™μ˜ λ§ˆμ§€λ§‰ λ…Έλ“œμ— μ‚½μž…
54+
55+
μƒˆλ‘œμš΄ λ…Έλ“œλ₯Ό κ²€μ‚¬ν•΄μ„œ λΆ€λͺ¨ λ…Έλ“œμ™€ κ΅ν™˜
56+
57+
58+
### νž™μ˜ μ‚­μ œ
59+
60+
μ΅œλŒ€ νž™μ—μ„œ μ΅œλŒ€κ°’μ€ 루트 λ…Έλ“œμ΄λ―€λ‘œ 루트 λ…Έλ“œκ°€ μ‚­μ œ (μ΅œλŒ€ νž™μ—μ„œ μ‚­μ œ 연산은 μ΅œλŒ€κ°’ μš”μ†Œλ₯Ό μ‚­μ œν•˜λŠ” 것이닀.)
61+
62+
μ‚­μ œλœ 루트 λ…Έλ“œμ—μ„œλŠ” νž™μ˜ λ§ˆμ§€λ§‰ λ…Έλ“œλ₯Ό κ°€μ Έμ˜΄
63+
64+
νž™μ„ μž¬κ΅¬μ„±
4865

4966
```C++
5067

0 commit comments

Comments
Β (0)