Stacks (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
14 cards from this deck
ShowHide
Practise the cards
14 cards from this deck
Data structure principle used by stacks
Data structure principle used by stacks
LIFO (Last In, First Out)
What does LIFO stand for?
What does LIFO stand for?
Last In, First Out
Stack operation that adds item to top
Stack operation that adds item to top
Push
Stack operation that removes item from top
Stack operation that removes item from top
Pop
Stack operation: view top without removing
Stack operation: view top without removing
Peek
Stack operation: check if empty
Stack operation: check if empty
IsEmpty
Stack operation: check if at max capacity
Stack operation: check if at max capacity
IsFull
Error when pushing onto a full stack
Error when pushing onto a full stack
Stack Overflow
Error when popping from an empty stack
Error when popping from an empty stack
Stack Underflow
Data structure for dynamic stack implementation
Data structure for dynamic stack implementation
Linked list
Data structure for static stack implementation
Data structure for static stack implementation
Array
What does a stack store when managing function calls?
What does a stack store when managing function calls?
Return addresses
Data structure that uses FIFO (opposite of stack)
Data structure that uses FIFO (opposite of stack)
Queue
Initial value of top pointer in array-based stack
Initial value of top pointer in array-based stack
-1
