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 | 31 |
Tags
- 코딩테스트
- gpdb
- Linked list
- CSV
- JavaScript
- Data Structure
- Python
- SQL
- django
- GitHub
- Algorithm
- Trie
- DFS
- 코테
- Priority Queue
- 알고리즘
- SWEA
- 모의SW역량테스트
- aws
- 알고리듬
- Vue.js
- Back tracking
- 시뮬레이션
- boj
- Bruth Force
- hash table
- programmers
- spring boot
- 구현
- BFS
Archives
- Today
- Total
hotamul의 개발 이야기
[Data Structure][C++] Heap (Min Heap) 본문
myt-algorithm-practice/Samsung SW Certi Pro
[Data Structure][C++] Heap (Min Heap)
hotamul 2021. 11. 23. 18:26Definition of Min Heap
- Complete Binary Tree
- The value of Parent <= The value of Child
Method
- Push(x) : push a element x to heap
- Pop() : remove the smallest element from heap
- Top() : return the smallest element from heap
Implement
- Parent Index : i / 2
- Left Child Index : i * 2
- Right Child Index : i * 2 + 1
'myt-algorithm-practice > Samsung SW Certi Pro' 카테고리의 다른 글
[Algorithm][C++] BOJ 10825: 국영수 (Priority Queue, Heap) (0) | 2021.11.25 |
---|---|
[Algorithm][C++] BOJ 1764: 듣보잡 (Hash Table + Merge Sort) (0) | 2021.11.23 |
[Data Structure][C++] Hash Table (0) | 2021.11.22 |
[Algorithm][C++] BOJ 1620: 나는야 포켓몬 마스터 이다솜 (Hash Table - Chaining (Single Linked List) (0) | 2021.11.22 |
[Algorithm][C++] BOJ 3190: 뱀 (Double Linked List) (0) | 2021.11.21 |
Comments