Priority Queue
Priority queue:- It is a special type of queue which stores group of elements. Each element has a priority number associated with it. Priority queue is an ADT (Abstract Data Type) which is like a regular queue or data structure but it will provide services on the basis of priority of an element. यह एक विशेष प्रकार का क्यू होता है जो एलिमेंट्स का समूह रखता है। प्रत्येक एलिमेंट से एक प्रायोरिटी नंबर संलग्न होता है। प्रायोरिटी क्यू एक ADT है जो एक सामान्य क्यू या डाटा स्ट्रक्चर के समान है परंतु यह एलिमेंट की प्रायोरिटी (प्राथमिकता) के आधार पर सुविधा प्रदान करता है। Rules of Priority Queue- प्रायोरिटी क्यू के नियम- 1. Element which has higher priority will be inserted and deleted before other elements which has lower priority. वह एलिमेंट जिसकी प्रायोरिटी अधिक होती है अन्य कम प्रायोरिटी एलिमेंट्स की तुलना में पहले इन्सर्ट एवं डिलीट किया जावेगा। 2. If two or more element has same priority then we follow FCFS (first come first serve) approach in which elements are deleted in order of the...