Question DSA-STK-0002
EasyWhich principle does a stack follow?
- A.
Random access
- B.
LIFO (last in, first out)
- C.
Show answer and explanation
Answer: B
The last item pushed is the first popped, like a stack of plates.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Stacks question
Which principle does a stack follow?
Random access
LIFO (last in, first out)
Answer: B
The last item pushed is the first popped, like a stack of plates.
Priority order
FIFO (first in, first out)