00:02
Hello students, the priority queue interface is a data structure that maintains a collection of elements and each associated with a priority.
00:11
The essential methods supported by the priority queue interface are the add method of x and where in the add method of x where you can see this method adds an element x to the priority queue.
00:32
It adds an element x to the priority queue.
00:48
As the element is inserted based on its priority ensuring that the elements with the higher priority and queue is the first.
00:57
So if two elements have the same priority then the order of the insertion may be considered.
01:04
So the next is the delete of min method.
01:12
So this method removes and returns the element with the highest priority.
01:17
It removes and returns the element with the highest priority.
01:42
As from the priority queue after deleting the minimum element and remaining elements are adjusted to maintain the ordered based on the priority.
01:53
The third is the size method.
01:59
This method returns the number of elements currently present in the queue.
02:04
It returns the number of elements currently present in the queue.
02:27
In the priority queue as implementing these methods using a singly linked list as the running time here it analyzes that the add method singly linked list this is the code for the singly linked list for adding.
02:52
You can see here we are creating a priority queue.
02:56
Then initially we will just initialize our value as the value priority queue all those things and later we will create a method of the class of the priority queue and then we will create a method for the add delete of min as well as for the as well as for the you can say for the size of the method...