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.
1 Replies - 540 Views - Last Post: 28 August 2013 - 02:22 PM
Replies To: How to create a partially ordered tree that works as a priority queue
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.
Page 1 of 1