Stacks and Queues

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/17

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

18 Terms

1
New cards

Stacks

A collection of elements following the Last In, First Out (LIFO) principle.

2
New cards

Queues

A collection of elements following the First In, First Out (FIFO) principle.

3
New cards

Push

Operation that adds an element to the top of the stack.

4
New cards

Pop

Operation that removes the topmost element from the stack and returns it.

5
New cards

Peek (Top)

Operation that returns the topmost element of the stack without removing it.

6
New cards

Is Empty?

Determines whether the stack does not contain any elements.

7
New cards

Is Full?

Determines if the stack has reached its capacity.

8
New cards

Abstract Data Types (ADT)

A conceptual model focusing on describing operations, regardless of underlying implementation.

9
New cards

Enqueue

Operation that adds an element to the end of the queue.

10
New cards

Dequeue

Operation that removes the first element from the queue and returns it.

11
New cards

Peek (Front)

Operation that returns the first element of the queue without removing it.

12
New cards

Linked List Implementation

A way to implement stacks and queues where each element is a node in a linked list.

13
New cards

Array Implementation

A way to implement stacks and queues using an array, requiring a specified size.

14
New cards

Running Time Complexity

A measure of the time an algorithm takes to complete based on the size of the input.

15
New cards

Circular Arrays

A method of using a fixed-size array to implement a queue, allowing for efficient reuse of space.

16
New cards

LIFO

Last In, First Out; describes the order in stacks.

17
New cards

FIFO

First In, First Out; describes the order in queues.

18
New cards

Capacity

The maximum number of elements that a stack or queue can hold.