subject

The clients are arriving to get passports. the arriving clients register at the window. each arriving client has a priority number and name. the priority numbers vary from 1 to 10. ten being the highest priority and 1 being the lowest. at 10: 00 am, the passport office will start serving clients that had registered by then at the window. the clients will be served not in the order that they arrived but in the order of their priority. first, all with priority 10; then those with priority 9 and so on.

to simulate the above, create an array based priority queue using max heap. input registering clients one by one and enque them one by one into the priority queue. each client input data will consist of client priority and name. priority of -1 will indicate end of data. after all the clients are enqued, deque them from the priority queue one by one and display them one by one till priority queue becomes empty. see the test input data and the expected output below.

test data

input data

3 jim

2 judy

7 jill

1 jimmy

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 21:00
Will this setup result in what kathy wants to print?
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
"gps interaction and cognitive process" respond to the following: imagine that you have been asked to design a gps product that will have voice recognition and bluetooth capability. discuss and conceptualize a user interaction model. predict two (2) problems that may arise in gps products with voice recognition and bluetooth capability. recommend solutions for each of these issues. attention is one of the six cognition processes. when attention is applied to a design, the goal is to make it easier for the end user to quickly locate where he / she should type information on the computer or mobile device screen. compare and contrast how the google search engine and the microsoft bing search engine employ the attention cognition process. provide your opinion as to which search engine better employs the attention cognition process and explain why.
Answers: 3
question
Computers and Technology, 25.06.2019 06:30
If she presses the left arrow , what will happened
Answers: 1
question
Computers and Technology, 25.06.2019 15:40
Which is most likely to represent a single machine instruction for a small cpu? 0 11 11101101101 01
Answers: 1
You know the right answer?
The clients are arriving to get passports. the arriving clients register at the window. each arrivin...
Questions
question
Mathematics, 28.08.2021 02:30
question
Mathematics, 28.08.2021 02:30
question
Biology, 28.08.2021 02:30
question
Mathematics, 28.08.2021 02:30
question
Mathematics, 28.08.2021 02:30
question
Mathematics, 28.08.2021 02:30
Questions on the website: 13722361