panditakshay402 / Hacktoberfest

Join the Hacktoberfest fun! Contribute to this repo and earn cool swag while improving open-source projects.
115 stars 413 forks source link

Create pirorityQueue.cpp #347

Closed Suchit1938 closed 1 month ago

Suchit1938 commented 1 month ago

A priority queue :- that arranges elements based on their priority values. Elements with higher priority values are typically retrieved or removed before elements with lower priority values. Each element has a priority value associated with it. When we add an item, it is inserted in a position based on its priority value. Here's the code for priority queue using array.

Plz, accepted the PR under hacktoberfest-accepted