123. Introducing the Binomial Heap data structure
A Binomial Heap data structure is a set composed of Binomial Trees. Each Binomial Tree is a Min Heap, which means that it follows the min-heap property. In a nutshell, a heap is a Min Heap if its items are in descending order, meaning that the minimum item is the root (more details are available in The Complete Coding Interview Guide in Java book).
In a nutshell, a Binomial Tree is ordered and typically defined in a recursive fashion. It is denoted as Bk, where k implies the following properties:
- A Binomial Tree has 2k nodes.
- The height of a Binomial Tree is equal to k.
- The root of a Binomial Tree has the degree k, which is the greatest degree.
A B0 Binomial Tree has a single node. A B1 Binomial Tree has two B0 Trees, and one of them is a left subtree of the other one. A B2 Tree has two B1, one of which is the left subtree of the other. In general, a Bk Binomial Tree contains two Bk-1 Binomial Trees...