c++data-structuresstlfibonacci-heap

STL for Fibonacci Heap?


where is the Fibonacci Heap in STL ? and if STL do not implement Fibonacci Heap what is the best practice to implement it using existing algorithms and containers in STL ?


Solution

  • boost has an implementation of it. Hope that helps. There doesn't seem to be one in the STL. Here's an example:

     for(int n=0;n<40;++n){
        std::cout<<"F("<<n<<")="<<fibonacci(n)<<std::endl;
      }