1 Replies - 307 Views - Last Post: 28 August 2013 - 02:22 PM Rate Topic: -----

#1 wjd39  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • 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  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10397
  • View blog
  • Posts: 38,466
  • 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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1