Podcast
Questions and Answers
What is the fundamental principle that a stack adheres to?
What is the fundamental principle that a stack adheres to?
- Sequential Access Memory (SAM)
- Last In First Out (LIFO) (correct)
- First In First Out (FIFO)
- Random Access Memory (RAM)
Which data structures can be utilized to implement a stack?
Which data structures can be utilized to implement a stack?
- Arrays (correct)
- Queues
- Trees
- Hash tables
What does the push() operation do on a stack?
What does the push() operation do on a stack?
- Reverses the order of elements
- Checks if the stack is empty
- Removes the top element
- Adds an element to the top of the stack (correct)
What is the specific scenario that occurs when the stack is completely full?
What is the specific scenario that occurs when the stack is completely full?
What does the peek() operation do on a stack?
What does the peek() operation do on a stack?