1.

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 IRCTCEnquiry is from Stack using Array in division Abstract Data Types of Data Structures & Algorithms II have been asked this question in examination.

Answer»

Correct option is (a) piling up of chairs one above the other

Best explanation: Stack follows Last In First Out (LIFO) POLICY. Piling up of chairs one above the other is based on LIFO, people standing in a line is a queue and if the service is based on priority, then it can be associated with a priority queue. Tatkal Ticket Booking Follows First in First Out Policy. People who CLICK the book now first will enter the booking page first.



Discussion

No Comment Found

Related InterviewSolutions