Why my code is not giving correct op

1 3 2 11 12
this is correct output

first element is minimum element

1,2,3… Will be output please check once

vector is not sorted in heap
only first element is smallest or largest
when you pop first then again first element should be smallest in min heap
this is handled in pop function

I didn’t get you can you please write in code and explain me

watch complete videos of heap
you will understand

this is only first video in which insertion is taught
in next video sir implement pop and heapify function
after that main is explained
watch these also