Data structures and algorithms: Priority queue as Binary Tree

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 2K views
gruba
Messages
203
Reaction score
1

Homework Statement


Explain and compare two efficient implementations of a priority queue using binary tree.
Ilustrate this on an example of ascending priority queue that is created when elements
15, 38, 45, 21, 8, 55,20 are inserted and the two largest elements are deleted.

Homework Equations


3. The Attempt at a Solution [/B]
Could someone give some guidance on this question?
I don't need code, just an explanation.
 
Last edited:
on Phys.org
Can you say what aspects you do not understand? Are you familiar with binary trees? How do you interpret 'priority' in the context of the example? What primitive functions do you think will need to be performed on the data structure?