Which of the following real world scenarios would you associate with a stack data structure?
A. piling up of chairs one above the other
B. people standing in a line to be serviced at a counter
C. offer services based on the priority of the customer
D. tatkal Ticket Booking in IRCTC
Answer:A
Which of the following real world scenarios would you associate with a stack data structure?
A. piling up of chairs one above the other B. people standing in a line to be serviced at a counter C. offer services based on the priority of the customer D. tatkal Ticket Booking in IRCTC
Explanation: The Last In First Out (LIFO) strategy is preceded by Stack. A LIFO queue is formed by stacking chairs one on top of the other; a queue is formed by people standing in a line; and if the service is based on priority, it may be associated with a priority queue. Tatkal Ticket Booking is based on a first-come, first-served basis. Those who press the book now button first will be taken to the booking tab.