Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
자료구조와 알고리즘의 관계, 힙
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Sour_sr
June 16, 2020
27
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
자료구조와 알고리즘의 관계, 힙
Sour_sr
June 16, 2020
Transcript
32 slides
ܐҳઑ৬ ঌҊ્ܻ नࢲܿ ?
ܐҳઑ = ঌҊ્ܻ?
۽Ӓ۔ = ܐҳઑ + ঌҊ્ܻ
ੑ۱ ۱
যڌѱ ? ܐҳઑ
যڌѱ ܻ? ঌҊ્ܻ
None
״ - ظ - ࣗ
ࣗ - ظ - ״
ࣗ - ظ - ״
ࣗ ظ Ž Ŭ
ܐҳઑ
None
None
None
None
ঌҊ્ܻ
ই ഒۆझ۞ࠗ۞~
ܐҳઑܳ ٜ݅ ٸ, ঌҊ્ܻ ѐੑغযঠೞӝ ٸޙ
൩
௸ ࢶࣽਤ ௸
୭؆ч~ ୭ࣟч~
ࠗݽ ֢٘ ః ч ध ֢٘ ః чࠁ ೦࢚ ()
ܻ
1. ൩ী ࢜۽ ਃࣗо ٜয৳. 2, ࢜۽ ֢٘ח ൩ ݄݃
֢٘ী যࢲ ੑೠ. 3. ൩ ઑѤਸ ݅ೡ ٸө ࢜۽ ֢٘ܳ ࠗݽ ֢ٜ٘җ Үജೠ.
None
None
// ୭ ൩(max heap) ੑ ೣࣻ void insert_max_heap(HeapType *h, element
item) { int i; i = ++(h->heap_size); while((i != 1) && (item.key > h->heap[i/2].key)) { h->heap[i] = h->heap[i/2]; i /= 2; } h->heap[i] = item; }
1. ୭؆чੋ ܖ֢٘ܳ ઁೠ. 2, ઁػ ܖ֢٘ী ൩ ݄݃ ֢٘ܳ
оઉৡ. 3. ൩ ઑѤਸ ݅ೡ ٸө ҳࢿೠ.
None
None
None
// ୭ ൩(max heap) ઁ ೣࣻ element delete_max_heap(HeapType *h){ int
parent, child; element item, temp; item = h->heap[1]; temp = h->heap[(h->heap_size)--]; parent = 1; child = 2; while(child <= h->heap_size) { if( (child < h->heap_size) && ((h->heap[child].key) < h->heap[child+1].key) ){ child++; } if( temp.key >= h->heap[child].key ){ break; } h->heap[parent] = h->heap[child]; parent = child; child *= 2; } h->heap[parent] = temp; return item; }
More Decks by Sour_sr
See All by Sour_sr
리팩토링
seorim
0
32
엔디안
seorim
0
32
프레임과페이지
seorim
0
32
분할정복법
seorim
0
45
Featured
See All Featured
Scaling GitHub
holman
464
140k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k
Building Adaptive Systems
keathley
44
3.3k
ラッコキーワード サービス紹介資料
rakko
5
6M
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
320
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
830
A Modern Web Designer's Workflow
chriscoyier
699
190k