Data Structures and Algorithms Review

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

1/25

flashcard set

Earn XP

Description and Tags

Flashcards covering data structures, algorithms, and related terms from the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

Complexity (Big O Notation)

An estimate of the number of loops in a program; used to understand time complexity.

2
New cards

Common Complexity Classes

O(N) - Linear, O(N^2) - Quadratic, O(N log N) - linearithmic

3
New cards

Stack (LIFO)

A data structure where the last element inserted is the first element removed (Last In, First Out).

4
New cards

Stack - Push

An operation to insert an element into the stack.

5
New cards

Stack - Pop

An operation to remove the top element from the stack.

6
New cards

Stack - Peek

An operation to view the top element without removing it.

7
New cards

Queue (FIFO)

A data structure where the first element inserted is the first element removed (First In, First Out).

8
New cards

Queue - Dequeue

An operation to remove the element from the front of the queue.

9
New cards

List

A general data structure that allows insertion or removal from any position (middle, end, etc.).

10
New cards

Recursion

A programming technique where a function calls itself to solve smaller subproblems.

11
New cards

Recursion - Base Case

The termination condition for a recursive function, preventing infinite loops.

12
New cards

Iterator

A component that allows traversal and removal of elements from a data structure.

13
New cards

Iterator - hasNext()

A method to check if there are more elements in the data structure during iteration.

14
New cards

Iterator - next()

A method to retrieve the next element in the data structure during iteration.

15
New cards

Optimal Sorting Algorithms

Sorting algorithms with a complexity of O(N log N), such as Merge Sort and Quick Sort.

16
New cards

Merge Sort

A sorting algorithm that splits the array into two parts, sorts them recursively, and then merges the sorted parts.

17
New cards

Quick Sort

A sorting algorithm that splits the array into three parts based on a pivot element: elements less than the pivot, the pivot, and elements greater than the pivot.

18
New cards

Binary Search

An efficient search algorithm that requires the data to be sorted and eliminates half of the elements in each step.

19
New cards

Hash Map (Key-Value Table)

A data structure that handles insertion, removal, overwrite, and retrieval of values based on keys.

20
New cards

Binary Search Tree (BST)

A tree data structure where the value in each node is greater than or equal to any value in its left subtree and less than or equal to any value in its right subtree.

21
New cards

BST Traversal - Level Order

Read nodes from left to right, top down.

22
New cards

Heap

A complete binary tree where the root node of every subtree is the smallest (in a min-heap) element.

23
New cards

Heap - Insertion

Adding a new node to the heap as the last leaf and then moving it up to its correct position.

24
New cards

Heap - Removal

Removing the root node, replacing it with the last leaf, and then pushing the new root node down to its appropriate position.

25
New cards

Graphs

Generalization of trees.

26
New cards

Breadth-First Search (BFS)

A graph traversal algorithm that uses a queue to maintain the order of traversal.