can we here replace the node to be deleted with the last node and then delete the last node and perform the upheapify function as done while deleting the root node
Deleting node other than the root node in a heap
@anshuman_U you can do this. Every subtree of the heap is heap itself, so we can treat the node to be deleted as the root of the subtree and perform the deletion. After heapy is done the whole heap will be correct.
if this resolves your doubt you can mark it as resolved.