A minimum heap is a list of numbers such that the ith number is smaller than the (2i)th and (2i+1)th numbers. For example, L={1,2,3,3,5,4,7} is a minimum heap because
- the 1st number is smaller than the 2nd and 3rd numbers;
- the 2nd number is smaller than the 4th and 5th numbers;
- the 3rd number is smaller than the 6th and 7th numbers.
Conversely, a maximum heap is a list of numbers such that the ith number is larger than the (2i)th and (2i+1)th numbers.
True or False?
If I reverse a minimum heap, I always get a maximum heap.