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