# How to create a partially ordered tree that works as a priority queue

Page 1 of 1

## 1 Replies - 707 Views - Last Post: 28 August 2013 - 02:22 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=327851&amp;s=a6f1f2fda42cec3c11c85b778efa499f&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 wjd39

Reputation: 0
• Posts: 1
• Joined: 28-August 13

# How to create a partially ordered tree that works as a priority queue

Posted 28 August 2013 - 11:47 AM

I am working on a homework problem for Dijkstra's shortest paths algorithm and part of the requirement is to use a partially ordered tree instead of a priority queue. This is the first time looking at Dijkstra's algorithm and i am not sure how the priority queue would be used to begin with so using a partially ordered tree instead has me completely lost. I am looking for an explanation of how the priority queue would be used and how a partially ordered tree can replace it. Thanks.

Is This A Good Question/Topic? 0

## Replies To: How to create a partially ordered tree that works as a priority queue

### #2 macosxnerd101

• Games, Graphs, and Auctions

Reputation: 11395
• Posts: 42,938
• Joined: 27-December 08

## Re: How to create a partially ordered tree that works as a priority queue

Posted 28 August 2013 - 02:22 PM

What you want to use is a binary heap. The root element of a binary heap is the smallest element in the collection, which will be removed on pop() operations.