Algorithms

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

1/24

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

Linear Search BigO

O(n)

2
New cards

Binary Search BigO

O(log n)

3
New cards

Bubble Sort BigO

O(n²)

4
New cards

Insertion Sort BigO

O(n²)

5
New cards

Merge Sort BigO

O(n log n)

6
New cards

Quick Sort BigO

O(n log n) average, O(n²) worst

7
New cards

Dijkstra’s Algorithm BigO

O((V + E) log V)

8
New cards

A* Algorithm BigO

O((V + E) log V)

9
New cards

Breadth-First Search (BFS)

O(V + E)

10
New cards

Depth-First Search (DFS) BigO

O(V + E)

11
New cards

Linear Search

Checks each item one-by-one until the target is found or end is reached

12
New cards

Binary Search

Repeatedly divides a sorted list in half to find the target

13
New cards

Bubble Sort

Repeatedly compares adjacent items and swaps if needed

14
New cards

Insertion Sort

Inserts each item into its correct place in a sorted part of the list

15
New cards

Merge Sort

Divides list into halves, sorts them recursively, then merges

16
New cards

Quick Sort

Picks a pivot, partitions the list, then sorts partitions recursively

17
New cards

Selection Sort

Repeatedly finds the smallest item and swaps it into the correct position

18
New cards

Dijkstra’s Algorithm

Finds shortest path from a starting node to all others using a priority queue

19
New cards

A* Algorithm

Improves Dijkstra’s by using a heuristic to guide the search faster

20
New cards

Breadth-First Search (BFS)

Uses a queue to explore all neighbours level by level

21
New cards

Depth-First Search (DFS)

Uses a stack (often recursion) to explore as deep as possible before backtracking

22
New cards

Hash Table

Uses a hash function to map keys to indices for fast lookup

23
New cards

Binary Search Tree (BST)

Inserts and finds elements using binary tree rules

24
New cards

Recursive Algorithm

Calls itself with a subset of the input to solve problems

25
New cards

Backtracking

Tries all possible options and backtracks when stuck