Build heap from array in NLOGN


please check this code, what is problem in it?

hello @CODER_JATIN

check now->

u were using while in place of if

bhaiya jab ham apne array ko heap mai convert kar rhe hai dono tevhniques use karke o(nlogn) and o(n) , to dono ki output different kyo aa rhi hai?

ek se jayda heap ban sakta hai given input pe.
sab tumhara implementation pe depend karta hai.

acha acha , thik hai bhaiya …

https://ide.codingblocks.com/s/439045 , bhaiya ye inplace heapsort wale ki output sahi ni aari?

check now->

okay bhaiya , ek hi mistake thi naa vo (max_ind) update?

ha. . . . . . . . . . . . .

Okay bhaiya , thank you :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.