Loading repovive.com/roadmaps/fundamental-algorithms
Roadmaps
Fundamental Algorithms
Backtracking
Problemset
Discussion
AI Helper
Sorting Algorithms
0/45
1
Intro
2
Why Sorting Matters
3
Stability Explained
4
Selection Sort
5
Selection Sort - Code
6
Insertion Sort
7
Insertion Sort - Code
8
Quiz: Basic Sorting
9
Merge Sort
10
The Merge Step
11
Merge Sort - Code
12
QuickSort
13
QuickSort - Partitioning
14
QuickSort - Code
15
Quiz: Efficient Comparison Sorts
16
Comparison Sort Summary
17
Lower Bound for Comparison Sorts
18
Quiz: Comparison Sort Theory
19
Counting Sort
20
Counting Sort - Code
21
Radix Sort
22
Radix Sort - Code
23
When to Use Non-Comparison Sorts
24
Quiz: Non-Comparison Sorts
25
Library Sorting
26
Custom Comparators
27
Quiz: Practical Sorting
28
Sort Colors - Read Statement
29
Sort Colors - Three Pointers
30
Sort Colors - Implementation
31
Merge Intervals - Read Statement
32
Merge Intervals - Approach
33
Merge Intervals - Implementation
34
Quiz: Interval Problems
35
Kth Largest Element - Read Statement
36
Kth Largest Element - QuickSelect
37
Kth Largest Element - Implementation
38
Count Smaller Numbers - Read Statement
39
Count Smaller Numbers - Merge Sort Approach
40
Count Smaller Numbers - Implementation
41
Largest Number - Read Statement
42
Largest Number - Custom Comparator
43
Largest Number - Implementation
44
Quiz: Sorting Applications
45
Section Recap
Binary Search
0/40
1
Intro
2
The Core Idea
3
Classic Binary Search
4
Classic Binary Search - Code
5
Lower Bound
6
Lower Bound - Code
7
Upper Bound
8
Find First and Last
9
Quiz: Lower and Upper Bound
10
Binary Search on the Answer
11
Koko Eating Bananas - Code
12
Example - Capacity to Ship Packages
13
Quiz: Binary Search on Answer
14
Binary Search on Real Numbers
15
Infinite Loops
16
Off-by-One Errors
17
Midpoint Overflow
18
Quiz: Binary Search Mistakes
19
Template - Find Minimum Valid
20
Template - Find Maximum Valid
21
Quiz: Binary Search Templates
22
First Bad Version - Read Statement
23
First Bad Version - Lower Bound Pattern
24
First Bad Version - Implementation
25
Search in Rotated Array - Read Statement
26
Search in Rotated Array - Approach
27
Search in Rotated Array - Implementation
28
Quiz: Rotated Array
29
Koko Eating Bananas - Read Statement
30
Koko Eating Bananas - Binary Search on Answer
31
Koko Eating Bananas - Implementation
32
Find First and Last Position - Read Statement
33
Find First and Last Position - Two Binary Searches
34
Find First and Last Position - Implementation
35
Quiz: Boundary Finding
36
Median of Two Sorted Arrays - Read Statement
37
Median of Two Sorted Arrays - Partition Approach
38
Median of Two Sorted Arrays - Implementation
39
Quiz: Advanced Binary Search
40
Section Recap
Two Pointers
0/35
1
Intro
2
Why Two Pointers Works
3
Pattern 1 - Opposite Direction
4
Pattern 2 - Same Direction
5
Example - Remove Duplicates
6
Example - Move Zeroes
7
Quiz: Same Direction Pointers
8
Fast and Slow Pointers
9
Linked List Cycle II
10
Quiz: Fast and Slow Pointers
11
Pattern 3 - Sorted Array Tricks
12
Example - Sort Colors
13
When Two Pointers Fails
14
Two Pointers vs Sliding Window
15
Quiz: Pattern Recognition
16
Two Sum II - Read Statement
17
Two Sum II - Converging Pointers
18
Two Sum II - Implementation
19
Container With Most Water - Read Statement
20
Container With Most Water - Greedy Choice
21
Container With Most Water - Implementation
22
Quiz: Container With Most Water
23
3Sum - Read Statement
24
3Sum - Reduce to Two Sum
25
3Sum - Implementation
26
Quiz: 3Sum
27
Trapping Rain Water - Read Statement
28
Trapping Rain Water - Two Pointer Approach
29
Trapping Rain Water - Implementation
30
Quiz: Trapping Rain Water
31
Linked List Cycle - Read Statement
32
Linked List Cycle - Floyd's Algorithm
33
Linked List Cycle - Implementation
34
Quiz: Floyd's Algorithm
35
Section Recap
Sliding Window
0/34
1
Intro
2
Fixed-Size Window
3
Variable-Size Window
4
Longest Substring Without Repeating
5
Optimization - Jump Left Pointer
6
Quiz: Variable vs Fixed Window
7
Longest Substring with K Distinct
8
Minimum Window Substring
9
Pattern - At Most K
10
At Most K - Helper Function
11
Quiz: At Most K Pattern
12
Common Mistakes
13
When Sliding Window Applies
14
Quiz: When Sliding Window Applies
15
Maximum Average Subarray - Fixed Window
16
Maximum Average Subarray - Implementation
17
Longest Substring Without Repeating - Read Statement
18
Longest Substring Without Repeating - Variable Window
19
Longest Substring Without Repeating - Implementation
20
Quiz: Variable Window
21
Minimum Window Substring - Read Statement
22
Minimum Window Substring - Approach
23
Minimum Window Substring - Implementation
24
Quiz: Minimum Window
25
Sliding Window Maximum - Read Statement
26
Sliding Window Maximum - Monotonic Deque
27
Why Monotonic Deque Works
28
Sliding Window Maximum - Implementation
29
Quiz: Monotonic Deque
30
Longest Repeating Character Replacement - Read Statement
31
Longest Repeating Character Replacement - Key Insight
32
Longest Repeating Character Replacement - Implementation
33
Quiz: Character Replacement
34
Section Recap
Divide and Conquer
0/35
1
Intro
2
Merge Sort as D&C
3
Binary Search as D&C
4
The Master Theorem
5
Quiz: Master Theorem
6
Counting Inversions
7
Counting Inversions - Merge
8
Closest Pair of Points
9
Quiz: Closest Pair
10
Maximum Subarray - D&C
11
Karatsuba Multiplication
12
QuickSelect
13
Quiz: QuickSelect
14
When D&C Beats Alternatives
15
D&C on Trees
16
Quiz: D&C Applications
17
Maximum Subarray - Read Statement
18
Maximum Subarray - D&C Approach
19
Maximum Subarray - Implementation
20
Merge k Sorted Lists - Read Statement
21
Merge k Sorted Lists - D&C Approach
22
Merge k Sorted Lists - Implementation
23
Quiz: Merge k Lists
24
Sort List - Read Statement
25
Sort List - Merge Sort on Lists
26
Sort List - Implementation
27
Different Ways to Add Parentheses - Read Statement
28
Different Ways to Add Parentheses - D&C Approach
29
Different Ways to Add Parentheses - Implementation
30
Quiz: Expression D&C
31
Construct Binary Tree - Read Statement
32
Construct Binary Tree - D&C Approach
33
Construct Binary Tree - Implementation
34
Quiz: Tree Construction
35
Section Recap
Backtracking
0/35
1
Intro
2
Backtracking Template
3
Subsets
4
Permutations
5
Combinations
6
Quiz: Core Patterns
7
Combination Sum
8
N-Queens
9
Sudoku Solver
10
Quiz: Constraint Satisfaction
11
Pruning Strategies
12
Backtracking vs DP
13
Quiz: Backtracking vs DP
14
Word Search
15
Generate Parentheses
16
Quiz: State-Based Backtracking
17
Subsets - Read Statement
18
Subsets - Include/Exclude Pattern
19
Subsets - Implementation
20
Permutations - Read Statement
21
Permutations - Used Array Pattern
22
Permutations - Implementation
23
Quiz: Permutation Patterns
24
Combination Sum - Read Statement
25
Combination Sum - Approach
26
Combination Sum - Implementation
27
N-Queens - Read Statement
28
N-Queens - Constraint Tracking
29
N-Queens - Implementation
30
Quiz: N-Queens
31
Word Search - Read Statement
32
Word Search - Grid Backtracking
33
Word Search - Implementation
34
Quiz: Grid Backtracking
35
Section Recap
Complete Search
0/32
1
Intro
2
Estimating Time Limits
3
Enumerating All Subsets
4
Enumerating All Permutations
5
Quiz: Enumeration
6
Meet in the Middle
7
Meet in the Middle - Example
8
Quiz: Meet in the Middle
9
Pruning in Complete Search
10
Iterative Deepening
11
Branch and Bound
12
Quiz: Search Optimization
13
Generate Parentheses - Read Statement
14
Generate Parentheses - State Space Search
15
Generate Parentheses - Implementation
16
Quiz: State Space Search
17
Letter Combinations - Read Statement
18
Letter Combinations - Approach
19
Letter Combinations - Implementation
20
Sudoku Solver - Read Statement
21
Sudoku Solver - Constraint Propagation
22
Sudoku Solver - Implementation
23
Quiz: Constraint Propagation
24
Partition to K Equal Sum - Read Statement
25
Partition to K Equal Sum - Pruning Strategies
26
Partition to K Equal Sum - Implementation
27
Quiz: Partition Pruning
28
Closest Subsequence Sum - Read Statement
29
Closest Subsequence Sum - Meet in the Middle
30
Closest Subsequence Sum - Implementation
31
Quiz: Meet in the Middle Advanced
32
Section Recap
Bit Manipulation
0/35
1
Intro
2
Bitwise Operators
3
Common Bit Tricks
4
Counting Set Bits
5
Quiz: Set Bits
6
XOR Properties
7
Single Number II
8
Quiz: XOR Properties
9
Bitmask DP
10
Subset Iteration with Bitmasks
11
Quiz: Bitmask Subsets
12
Missing Number
13
Two Numbers Appearing Once
14
Power of Two
15
Reverse Bits
16
Quiz: Bit Tricks
17
Single Number - Read Statement
18
Single Number - XOR Properties
19
Single Number - Implementation
20
Number of 1 Bits - Read Statement
21
Number of 1 Bits - Brian Kernighan's Trick
22
Number of 1 Bits - Implementation
23
Quiz: Brian Kernighan
24
Power of Two - Read Statement
25
Power of Two - Bit Trick
26
Power of Two - Implementation
27
Single Number III - Read Statement
28
Single Number III - Approach
29
Single Number III - Implementation
30
Quiz: Two Unique Numbers
31
Maximum XOR of Two Numbers - Read Statement
32
Maximum XOR of Two Numbers - Trie Approach
33
Maximum XOR of Two Numbers - Implementation
34
Quiz: Trie and XOR
35
Section Recap
Fundamental Algorithms - Roadmaps | Repovive