A stack follows which principle?
- Last in first out
- Least in first out
- Large in first out
- Level in first out
Show answer and solution
Correct answer: A. Last in first out
1. Elements enter and leave a stack at the same end.
2. That forces a particular order of removal.
3. A stack follows the Last-In-First-out principle.
4. So the answer is last in first out.
_Source: syllabus Computer Science, Ch 3 'Stack' and Ch 4 'Queue'_