All Questions
Tagged with heaps search-algorithms
3 questions
1
vote
1
answer
365
views
How to do binary search on a path in a binary heap
I am trying to solve this question:
Let's say you have a binary heap and an index $i$, design an algorithm that finds if a number $x$ appears in the path between the root of the heap and $heap[i]$ in ...
-2
votes
1
answer
691
views
Best search in Heap Array
Can someone give me the best search algorithm in a max heap?
In particular simply implemented as an array. I knew it has complexity of $O(N)$ but it can be done better. For example, if $A[i] < \...
9
votes
2
answers
20k
views
Is search a binary heap operation?
According to the Wikipedia page, search is "not an operation" on binary heaps (see complexity box at top-right).
Why not? Binary heaps may not be sorted, but they are ordered, and a full graph ...