優先隊列C語言實現

優先隊列利用堆實現,堆的實如今前面已經說過了,優先隊列的一個重要的操做是:api 1.  heap_max  O(1)  code 2. heap_extract_max  O(lgn)隊列 3. heap_increase_key  O(lgn)class 4, heap_insert  O(lgn)語言 下面是C語言實現while #define MIN -100000 int heap_m
相關文章
相關標籤/搜索