STL for Fibonacci Heap?

amin picture amin · Jan 2, 2013 · Viewed 11.8k times · Source

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 ?

Answer

hd1 picture hd1 · Jan 2, 2013

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;
  }