0 0 votes please help me out in solving this question. the solution provided there is not upto the mark Programming in C data-structures heap-sort binary-heap difficult made-easy-test-series + – sachidanand_dwivedi 2.4k views answer comment Share Follow Print See all 14 Comments 14 14 Comments reply Show 11 previous comments sachidanand_dwivedi commented Dec 22, 2022 reply Follow flag Well Guys, The answer is 7 0 0 replyShare [ Jiren ] commented Dec 23, 2022 reply Follow flag @sachidanand_dwivedi can you post solution provided by them 1 1 replyShare Rohit Chakraborty commented Oct 5, 2023 reply Follow flag Is the answer 3? Please give the answer... 0 0 replyShare Please log in or register to add a comment.
0 0 votes in heap sort loop runs for n times for every node and in each loop it calls heapify function 1 time after 1st iteration largest element is at its place after 2nd iteration 2nd largest element is at its place after 3rd iteration 3rd largest element is at its place and so on in the given output we can see that only last 3 elements are in their position that are 20,23and 25 so heapify would have been called 3 time .So the answer is 3 Ujjaval251 answered Mar 18, 2023 Ujjaval251 comment Share Follow 0 reply Please log in or register to add a comment.
0 0 votes in heap sort loop runs for n times for every node and in each loop it calls heapify function 1 time after 1st iteration largest element is at its place after 2nd iteration 2nd largest element is at its place after 3rd iteration 3rd largest element is at its place and so on in the given output we can see that only last 3 elements are in their position that are 20,23and 25 so heapify would have been called 3 time .So the answer is 3 Ujjaval251 answered Mar 18, 2023 Ujjaval251 comment Share Follow 0 reply Please log in or register to add a comment.