Copy-pasted an implementation of Fibonacci heap. ;)