i have a general question about the operations find(x) / delete(x) / decrease-key(x,d) / increase-key(x,d) in a heap (which are used in question 3,4)
i assumed that these operations get the element x, but not his index in the array
i found that i costs O(n) to perform these actions, because we first need to find x in the heap, and heap is not a binary search tree
so in the worst case we need to check every element in the array
while keeping in mind all other operations on a heap where O(logn) or O(1)
it makes me think i might have a mistake or a wrong assumption
is there a cheaper way to perform these operations?