Question: what is the difference between queue and priority queue?
Answer: Queue is a list where insertion is done at one end and removal is done at the other end. Priority queue does not have any ends. ... In a priority queue, elements can be inserted in any order but removal of the elements is in a sorted order.