For implementing a priority queue using an array, a structure is created to store the values and priority of the element and then the array of that structure is created to store the elements. The following operations are involved in this implementation: enqueue() - Also known as the insertion process, this function is used to insert the elements in the queue. peek() - This function will traverse the array to return the element with the highest priority. If it finds two elements having the same priority, it returns the highest value element among them. dequeue() - The dequeue() function is used to shift all the elements, 1 position to the left of the element returned by the peek() function, and decreases the size of the queue.