Binomial heaps

Another kind of heap is a binomial heap. This data structure consists of a set of binomial trees with different orders. The binomial tree with order 0 is just a single node. You can construct the tree with order n using two binomial trees with order n-1. One of them should be attached as the left-most child of the parent of the first tree. It does sound a bit complicated, but the following diagram should remove any confusion:

As already mentioned, the binomial tree with order 0 is only a single node, as shown on the left. The tree with order 1 consists of two trees with order 0 (marked with the dashed border) connected to each ...

Get C# Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.