On Tue, Jun 07, 2005 at 12:25:50PM +0200, Gracjan Polak wrote:
> Another question: priority queue. In libraries bundled with ghc we have 
> Data.Queue, but I couldn't find PriorityQueue. Is there somewhere an 
> implementation that everybody uses, but is not in the library?

You can use the new Data.Map module for this (old Data.FiniteMap too,
but a bit more clumsily), it has findMin, findMax, deleteFindMin,
deleteFindMax, deleteMin, deleteMax. All these operations should have
O(log N) cost.

Best regards
Tomasz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to