Is there a standard Java implementation of a Fibonacci heap?

前端 未结 3 677
無奈伤痛
無奈伤痛 2020-12-07 19:00

I was looking at the different kind of heap data structures.

The Fibonacci heap seems to have the better worst case complexity for (1) insertion, (2) deletion and (

3条回答
  •  -上瘾入骨i
    2020-12-07 19:37

    But why they did not use a Fibonacci heap?

    I think the main reason is because the Fibonacci heap can only help in the case when you have lot more decreaseKey operation connected to one extractMin operation. For example, when you are using it with the Dijkstra's algorithm.

    Also, is there an implementation of Fibonacci heap in Java.util?

    There is no implementation in Java.util, but I did some experiment on this topic using existing open-source versions of the Fibonacci heap. You can find it on my blog or on the project's GitHub repository.

提交回复
热议问题