PriorityQueue1 [C] Heap의 특정 index 값 수정 Heap(Priority Queue)에서 특정 index의 값을 수정하는 방법에 대한 글이다. 아래의 내용을 이해하기 위해서는 "배열을 이용한 Heap 구현"에 대해서 알고 있어야 한다. 아래의 링크에는 Heap에 대한 자세한 설명이 있다. [자료구조] 힙(heap)이란 - Heee's Development Blog Step by step goes a long way. gmlwjd9405.github.io 흔히 알고있는 배열을 이용하여 Heap을 구현한 방법은 아래 코드와 같다. #define MAX_SIZE 100 int heap[MAX_SIZE]; int heap_size = 0; void HeapInit(void) { heap_size = 0; } void GoUp(int index) { int.. 2024. 2. 7. 이전 1 다음