Efficient heaps in purely functional languages

后端 未结 9 1887
被撕碎了的回忆
被撕碎了的回忆 2021-01-30 13:42

As an exercise in Haskell, I\'m trying to implement heapsort. The heap is usually implemented as an array in imperative languages, but this would be hugely inefficient in purely

9条回答
  •  离开以前
    2021-01-30 14:15

    And here is a Fibonacci Heap in Haskell:

    https://github.com/liuxinyu95/AlgoXY/blob/algoxy/datastruct/heap/other-heaps/src/FibonacciHeap.hs

    Here are the pdf file for some other k-ary heaps based on Okasaki's work.

    https://github.com/downloads/liuxinyu95/AlgoXY/kheap-en.pdf

提交回复
热议问题