阅读背景:

纯功能语言中的高效堆

来源:互联网 

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 functional languages. So I've looked at binary heaps, but everything I found so far describes them from an imperative viewpoint and the algorithms presented are hard to translate to a functional setting. How to efficiently implement a heap in a purely functional language such as Haskell?As an exercise in Haskell, I'm trying to implem




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: