-
자료구조 - Heap인공 지능 개념 2024. 9. 20. 18:45
Heap (Max heap)
1. 완전 이진트리
2. 모든 부모 node는 자식 node 보다 크거나 같은 값을 가짐
cf) min heap도 있음(반대경우)
아래그림
Heap 데이터 삽입
- 이진트리를 유지하면서 새로운데이터는 부모보다 큰지 작은지 확인후 자리바꿈
아래그림)
'인공 지능 개념' 카테고리의 다른 글
자료구조 - 트리탐색 (0) 2024.09.22 자료구조 - Heap (2) (0) 2024.09.21 자료구조 - 그래프, 트리 (0) 2024.09.20 crossentropy (1) 2024.09.20 RNN (Recurrent Neural Network) 순환신경망 (1) 2024.09.09