FlashKeepers

Computer Science · College · College and University

Data Structures, Unit 3: Stacks and Queues

Data Structures, unit: Stacks and Queues. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.

About this set

38 basic cards for College Computer Science. Set 3 of 10 in Data Structures. It opens with "What is a stack?" and "What operation adds an element to the top of a stack?". Study it alongside the other College sets below.

38 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is a stack?
Show answerA linear data structure that follows Last-In-First-Out (LIFO) order
What operation adds an element to the top of a stack?
Show answerPush
What operation removes and returns the top element of a stack?
Show answerPop
What operation returns the top element of a stack without removing it?
Show answerPeek (or top)
What is the time complexity of push and pop operations on a stack?
Show answerO(1)
What real-world scenario is commonly modeled by a stack?
Show answerThe undo feature in a text editor, or a browser's back button history
What is stack overflow, in the context of function calls?
Show answerRunning out of stack memory, often due to excessive or infinite recursion
What data structure is used behind the scenes to manage function calls in most programming languages?
Show answerA call stack
What is a common use of a stack in checking balanced parentheses?
Show answerPushing opening brackets and popping/matching them against closing brackets
What is a queue?
Show answerA linear data structure that follows First-In-First-Out (FIFO) order
What operation adds an element to the back of a queue?
Show answerEnqueue
What operation removes and returns the element at the front of a queue?
Show answerDequeue
What is the time complexity of enqueue and dequeue operations on a well-implemented queue?
Show answerO(1)
What real-world scenario is commonly modeled by a queue?
Show answerPeople waiting in line, or tasks waiting to be processed in order
What is a circular queue?
Show answerA queue implemented with a fixed-size array that wraps around to reuse freed space

23 more cards in the app

Study this set free