Question: solve it by java Q7. A program creates a queue. The program takes array of user names as String and then performs following operations: -
Q7. A program creates a queue. The program takes array of user names as String and then performs following operations: - If the user name starts with A to S, it will add (enqueue) to the queue - If the user name starts with T to Z, it will remove (dequeue) one element from the queue and then add both the user names to the queue. What will the queue look like if the input array is as follows? Please clearly label front and rear of the queue. ["Sara", "Asma", "Jasmine", "Taif", "Umna", "Ameera", "Dalaa", "Wajd"]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
