I am getting {20 10 8 9 1 5 6 4} instead of {20 10 9 6 1 5 8 4} when I use code without adding -1 in the beginning
Not getting required output
Since indexes are getting changed so is max heap but both are max heaps
Okay now I get it. Thanks
1 Like