How would I "heapify" an array based minimum heap in java once the remove min function has been called (this simply takes the element at index 1 and removes it, and then replaces it with the last item in the array). I'm confused as to how I would go about putting the array into a minimum heap again after the remove min has happened.
The index 0 is always kept empty in the heap minimum array. The parent index is i/2, the right child is 2i + 1, and the left child is 2i.
Any help would be much appreciated, thanks guys!