The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

How to implement prioprity queue using link list

Posted by joey on December 27, 2001 at 3:59 AM

How do I start implementing a priority queue using a singly linked list
which returns an empty priopty queue

which tests is the queue is empty and returns a boolean value of true if it is and false otherwise.

which inserts the item X into the queue Q according to the prioprity of x

which returns the greatest prioprity item in the queue(without deletion)

which deletes the greatest prioprity item.

which displays the contents of the queue

which tests if item X is in queue Q

which merges the queues Q,R preserving priority.

I appreciate your help greatly.
Thank You Very Much.




Replies:
  • Priorities? Chet Underwood, Esq. December 27, 2001 at 12:41 PM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us