I understand that deletion in a Min/Max heap occurs always at the root, and when it happens, the deleted node is replaced by the last node in the Binary Heap, then the node is heapify downward to find its correct position, making this on average a O(logN) operation.
Now, Binary Heap is commonly represented over arrays. Here comes the question: if deletion in an array at position [0] is log(n), because all right cells must be shift to the left, to fill the empty cell. Then, **why does a Min/Max Heap Binary Tree (which is represented over an array) is consider to be a O(logN) operation ** and not a O(n) operation.
Thanks for throwing light on the confusion!