1/15
Flashcards covering key concepts, operations, and implementations related to stacks and queues in C++.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Stack
A LIFO (last in, first out) data structure.
LIFO
Last in, first out; a principle describing the order of operations in a stack.
Static Stack
A stack of fixed size, often implemented using an array.
Dynamic Stack
A stack whose size varies as needed, often implemented using a linked list.
push
An operation that adds a value at the top of the stack.
pop
An operation that removes a value from the top of the stack.
isEmpty
A Boolean function that returns true if the stack currently contains no elements.
Overflow
An exception that occurs when trying to push onto a full stack.
Underflow
An exception that occurs when trying to pop from an empty stack.
Queue
A FIFO (first in, first out) data structure.
FIFO
First in, first out; a principle describing the order of operations in a queue.
enqueue
An operation that adds an element to the rear of the queue.
dequeue
An operation that removes an element from the front of the queue.
Circular Array
An array structure where the indices wrap around, allowing efficient use of space.
STL
Standard Template Library; a collection of C++ template classes.
deque
A double-ended queue that allows insertion and removal of elements from both ends.