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
- Algorithm
- Trie
- django
- Data Structure
- Bruth Force
- spring boot
- Back tracking
- 코테
- 알고리즘
- gpdb
- hash table
- SQL
- 시뮬레이션
- CSV
- 코딩테스트
- 모의SW역량테스트
- aws
- 알고리듬
- 구현
- JavaScript
- GitHub
- SWEA
- Linked list
- DFS
- boj
- BFS
- Vue.js
- programmers
- Priority Queue
- Python
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