Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
910 views
in Data Structures and Operations by (29.4k points)
closed by

Consider the following cases: 

(1) Paper cups are arranged on a dining table one above the other. 

(2) Many people are waiting in a row to take tickets fora the cinema. Identify and compare the data structure that you know in connection with the above mentioned contexts.

1 Answer

+1 vote
by (30.3k points)
selected by
 
Best answer

(1) Stack 

(2) Queue 

A stack is a linear data structure in which items – can be added or removed only at one end called top. But the working principle of the queue is first in first out manner. A new item is added at the rear and removed from the front of a queue.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

...