Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views3 pages

Priority Queue

Uploaded by

shlokshukla1469
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Priority Queue

Uploaded by

shlokshukla1469
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PRIORITY QUEUE

each element has a priority associated with it


In a priority Queue an element with highpriority
is served before an element with low priority
If two elements have the same priority they
are served according to their order in the queue
then
If the list S OchTime for insertion
based on the priority 011 time for deletion

If the List is not 115time for insertion


sorted ON time for deletion
Representation of prioritytiene
17 Aways
27 linked lists
linked list representation
START
It
ftp.I ithBB DD

th ER.FI I
characteristics
ex Priority Based Processing
27 Dynamic nature
37 Heap Implementation
Eection
2
pe it
i
YPI
i
iiiniti
ifi.int iiiiIifi
ftp.i
tiiifiii
4f
newnode
a
data val v
newnode Priority Pri
If START ULL OR IN START Priority
neurode next START
ns.ode.n
else 5
PH START
eepiiixiiii.in
whiteti
Cenowht newnode

next phenexk
sorted
Pte next newnode

end 04IT
DELETION

1ˢᵗS.it
PRIORITY QUEUE
Ltv
t.in
START NULL
Pff
If
Print underflow
else
FEET
temp
START next
START
Free temp
end to
end

Advantages
17Efficient Priority handling
27 Optimal for scheduling
34 Flexibility in Data Management
Disadvantages
ex complexity
27 Overhead
37 Potential inefficiency for simple use cases
Applications
14 CPU scheduling
27 Graph Algorithms
3 Network traffic Management
47 Real Time systems

You might also like