Please check my code for errors
Unable to detect the error
hello @Garvit012
can u please explain ur logic.
btw 
if u want max heap then here it should be < in place >
Please ignore that logic. I have submitted the question and resolved the doubt. Thanks for your help 