I was asked this question on a test and would like to make sure I answered correctly:
You are given a min heap. We want to increase all the nodes on the left most path (so the root, node 2, node 4, node 8......) by a value of c, so that the heap stays a min heap.
What is the limitation on c?
For instance, the min heap could be:
___2___
/ \
__8__ 7
/ \ / \
9 10 11 13
/ \ /
15 12 14
The left most path consists of the values 2, 8, 9 and 15
The expected answer is: c = 2