# Find successor element in heap

Does finding the successor of an element in a heap take $$O(\log n)$$?

An heap is not a binary search tree, so couldn't an element's successor be found in $$O(n)$$ time?

• In my opinion, finding an arbitrary element takes O(n) time in both a mini-heap and a max-heap Mar 19 at 21:59

Suppose you have a min heap $$H$$, and you want to find successor one of the leaf node that its successor is maximum value, so you need to scan all leaves in tree, in addition we know that number of leaves in $$H$$ is $$O(n)$$. So you need read $$O(n)$$ nodes.