This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this problem, there are types of events: ENTER (a student enters the queue) or SERVED. | |
A unique token is assigned to any student entering the queue. The queue serves the students | |
based on the following criteria: | |
The student having the highest Cumulative Grade Point Average (CGPA) is served first. | |
Any students having the same CGPA will be served by name in ascending case-sensitive alphabetical order. | |
Any students having the same CGPA and name will be served in ascending token order. | |
Given a sequence of events, print the names of students who are yet to be served(based on above criteria). | |
If the queue is empty, print EMPTY. | |
Input Format |