![]() |
Priority Queue implementation using Linked List
1 Attachment(s)
Introduction - What is priority QueueA priority queue is an abstract data type (ADT) supporting the following three operations: 1. Add an element to the queue with an associated priority 2. Remove the element from the queue that has the highest priority, and return it 3. (optionally) peek at the element with highest priority without removing it The CodeCode: CPP
This is the priority Queue implementation and the Queue implementation can be refered here - Queue implementation using Linked List. |
Re: Priority Queue implementation using Linked List
priprity queues are good but for implementing them we should be thorough with our purpose
|
Re: Priority Queue implementation using Linked List
Quote:
|
Re: Priority Queue implementation using Linked List
yes , I used it in my solution in homework :)
|
Re: Priority Queue implementation using Linked List
hello
that is great i want to ask u shabbir if i want to insert the data in order by maximum node how can i do that in this function that i have it Code:
// ------------- Insert ----------------//------------------------------------------------------------------------------------------ another question your display function is good but if i want it print the all nodes from maximum to minimum node what is the modification ????? thanx |
Re: Priority Queue implementation using Linked List
You need to sort your linked list
|
Re: Priority Queue implementation using Linked List
hello shabbir,
yes i mean sort the list |
Re: Priority Queue implementation using Linked List
Search the forum and you will find that too.
|
Re: Priority Queue implementation using Linked List
hi shabbir,
Thanks for your immediate reply......the code is actually a bouncer to me....i forgot to mention in my post that i dont require the code....a simple explanation of how to execute that would be enough.......it would be helpful if you can explain the whole thing in simple language......... thanks in advance, siya |
data in order by maximum
that is great
i want to ask u shabbir if i want to insert the data in order by maximum node how can i do that in this function that i have it. |
| All times are GMT +5.5. The time now is 17:30. |