Q. Suggested situations where you can use these data structures: (i) linear lists, (ii) stacks, (iii) queues.


Answer =

(i)
Linear list:-
• To maintain a shopping list.

(ii)
Stack:-
• reversal of a sequence.
• Infix to Postfix conversion.

(iii)
Queue:-
• Sharing of one resource among multiple users or seekers such as shared printer among multiple computers; Call center executive response among waiting calls etc.
• Airport authorities make use of queues in situation of sharing a single runway of airport for both landing and take-off of flights.
• CPU uses queues to implement round-robin scheduling among waiting processes.
• Queues are used in many computer algorithms also.

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post