Podcast
Questions and Answers
Which data structure uses the Last-In-First-Out (LIFO) principle?
Which data structure uses the Last-In-First-Out (LIFO) principle?
- Stack (correct)
- Queue
- Array
- Linked List
Which data structure uses the First-In-First-Out (FIFO) principle?
Which data structure uses the First-In-First-Out (FIFO) principle?
- Queue (correct)
- Stack
- Linked List
- Array
What is the main difference between a stack and a queue?
What is the main difference between a stack and a queue?
- Stack follows FIFO, while queue follows LIFO
- Stack follows LIFO, while queue follows FIFO (correct)
- Stack and queue both follow LIFO
- Stack and queue both follow FIFO