please help me to understand this question
Consider university human resource system that take the degree of the job applicant
and assign an ID for them (i.e. Sequential number).
(Suppose you only receive 20 applicant every year ) your program should take the degrees of each applicant and store it in an array. Since the index of array represents the ID of the applicant like the following: index+1=ID
The degrees are (Diploma, bachelor, master, PHD, Professor).If the user insert 1 it means professor degree and so on.
Degree Equivalent number
Professor Degree 1
EX: First applicant has Master degree ,second applicant has Professor degree, third applicant has Diploma degree…, so the array will be:
0 1 2
1 5 …
convert the array to Implement Priority Queue with Sorted Sequence (use linked list to implement the Priority Queue).
Since : the value = ID (ID = array index +1 ) .
the key =Degree (it means professor has the highest priority then key=1 and so on).
in your code, you have to go element by element in the array and insert that element in your new Priority Queue with Sorted Sequence (enqueue) . be sure you insert the element in the appropriate position.
Hint: if two entries have the same priority ( i.e. have the same key) then the new entry with same key value will be inserted after the already existing entry.