How many heaps of seven keys
The keys are stored in a complete binary tree with nodes (a root, two children, four grandchildren) so that every parent holds a smaller key than its children (a min-heap). How many different valid placements are there?
Show hints (2)+
- Which key must be at the root?
- Choose the key set of the left subtree; each subtree is then its own small heap.
Answer
Reveal answer →Final answer
80
Create a free account to see the full worked solution and track your progress.
Interview format: Prop Trading, Systematic & Data-Driven Trading