Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- 알고리즘
- red-black tree
- sstream
- Algorithm
- Articulation_Point
- Critical_Path_Analysis
- singly Linked List
- Biconnected_Component
- 구현
- 백준
- deletion
- template
- 총정리
- Heap
- Pair
- STL
- connected_component
- '0'
- sort
- 예제
- class_template
- 13305
- 5397
- function_template
- 자료구조
- c++
- qsort
- list
- data_structure
- 문법
Archives
- Today
- Total
- Today
- Total
- 방명록
목록Datastructure (1)
어제의 나보다 성장한 오늘의 나

Heap 이란? ◎ complete binary tree (parent node는 2개의 child node를 갖는다.) ◎ parent 와 child 간에 항상 대소 관계가 성립 ◎ parent node가 child node 보다 항상 크면 max heap, 항상 작으면 min heap ◎ max heap일때는 최상위 node가 가장 크고 , min heap일때는 최상위 node가 가장 작다. ◎ array의 index는 1 부터 사용한다. ◎ child index는 (parent_index)*2 , (parent_index)*2+1 ◎ 반대로 parent index는 (child_index) / 2 1. heap 구현 Array를 이용하여 Maxheap을 구현해보았다. 변수 / 생성자 / 소멸자 pr..
c++/data_structure_구현
2022. 2. 12. 16:04