• Support PF! Buy your school textbooks, materials and every day products Here!

Data structures and algorithms: Priority queue as Binary Tree

  • #1
208
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:

Answers and Replies

  • #2
haruspex
Science Advisor
Homework Helper
Insights Author
Gold Member
33,535
5,451
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?
 

Related Threads on Data structures and algorithms: Priority queue as Binary Tree

Replies
6
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
5
Views
1K
  • Last Post
Replies
1
Views
822
Replies
3
Views
4K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
0
Views
958
Replies
1
Views
308
  • Last Post
Replies
1
Views
2K
Replies
6
Views
765
Top