- qElement with element and priority
- enqueue method loops through all elements and puts new element in queue based on its priority.
- task Q. Is Priority Queue created by multiple heaps?
- Q. Why is it not possible to access the second smallest element in Min heap, is it same for priority queue?
time_complexity
- Enqueueing and dequeing methods: O(log(n))
- Remove(Object) and contains(Object) methods: O(n)
- Retrieval methods: O(1)