1/17
Flashcards to help review key concepts related to stacks, queues, and their implementations.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Stack
A data structure that follows the Last-In, First-Out (LIFO) principle, meaning the last item added is the first to be removed.
LIFO
Last-In, First-Out; a storage policy where the last element added is the first one to be removed.
Queue
A data structure that follows the First-In, First-Out (FIFO) principle, meaning the first item added is the first to be removed.
FIFO
First-In, First-Out; a storage policy where the first element added is the first one to be removed.
Push
An operation to add an element to the top of the stack.
Pop
An operation to remove the top element from the stack.
Peek
An operation to view the top element of the stack without removing it.
isEmpty
A method that checks if the stack or queue is empty.
Deque
A double-ended queue allowing insertions and removals from both ends.
Palindrome
A string that reads the same forwards and backwards, ignoring case.
Implementation of Stack
Can be done using an ArrayList, LinkedList, or an Array.
Circular Array
An array that wraps around so that the first index follows the last index.
Postfix Expression
An expression where operators follow their operands; easier to evaluate than infix.
Infix Expression
An expression where operators are placed between operands; requires consideration of precedence and parentheses.
Linked List
A data structure consisting of nodes, where each node contains data and a reference to the next node.
ArrayList
A resizable array implementation of the List interface.
LinkedList
A doubly linked node structure that implements the List and Queue interfaces.
Syntax Error Exception
An exception that indicates a syntax error occurred during expression processing.