I was trying to understand the concept of Max-Heap. And to my understanding its a complete binary tree and each parent has a value greater than its children.The example I was going though had the following array which it said was a Max-Heap.
BookArray [] = {45,10,11,3,2,7,9,1,0}
I then decided to shuffle the elements (so they are no longer in binary heap) and got this.
Shuffled[] = {11,1,0,7,9,3,2,10,45}
I then decided to write a program that would sort the elements in the array in Min-Heap so I got this array
Sorted[] = {45,11,3,10,7,0,2,1,9}
My question is if my sorted array is also a valid max-heap ? since my array does not match the bookArray