Heap

Dijkstra, Heap, Red-Black Tree

November 23, 2014 Blog

Dijkstra's Shortest-Path Algorithm BFS 는 undirected graph 에서 최단 경로를 찾지만, 이건 모든 edge 의 길이가 1일때만 그렇다. 다익스트라(dijkstra, 데이크스트라) 알고리즘은 directed graph 에서 non-negative length 에 대한...

C++ 힙 정렬 (Heap Sort), Bottom-up 과 Top-down 구현

April 4, 2014 Blog

Heap sort 힙 소트 는 선택 정렬군중 하나로서, 비교 기반 정렬 알고리즘입니다. 선형 시간(Linear Time) 탐색을 이용하는 기본적인 Selection Sort 보다 로그 시간(Logarithmic Time) 복잡도를 가지는 우선순위 큐를...