Write a program to remove the first element from the given input by using one of the Queue interface methods.
Note that the elements in Queue by default sorted in ascending order.
Input (PriorityQueue) |
Output (PriorityQueue) |
[Lion, Tiger, Cat, Rabbit, Mouse] |
[Lion, Mouse, Rabbit, Tiger] |
[Rose, Jasmine, Lotus, Peacock, Cassia] |
[Jasmine, Peacock, Lotus, Rose] |
[Suman, Sekhar, Rohan, Sukumar, Praneeth, Prakash] |
[Praneeth, Rohan, Sekhar, Suman, Sukumar] |
null |
null |