šŸš€Pro

Grokking the Coding Interview: Premium Edition

The ultimate coding interview preparation course. Master 20 essential patterns with 100+ carefully curated problems, AI-powered hints, voice coaching, and detailed solutions. Includes advanced patterns like Backtracking, Trie, Union Find, and Segment Trees not found in the standard edition.

20 modules 119 lessons ~30h AI voice coach
Start Learning — Pro

7-day free Pro trial included

Course Outline

1

Two Pointers

7 lessons

Master the two pointers technique to efficiently solve problems involving sorted arrays, pair searching, and in-place array manipulation. This pattern reduces time complexity from O(n²) to O(n).

Introduction to Two Pointers
Pair with Target Sum
Remove Duplicates
Squaring a Sorted Array
Triplet Sum to Zero
Dutch National Flag
Module Checkpoint: Two Pointers
2

Fast & Slow Pointers

6 lessons

Learn the fast and slow pointers (Floyd's Cycle Detection) technique to solve problems involving cycles in linked lists and arrays, and finding middle elements.

Introduction to Fast & Slow Pointers
Linked List Cycle Detection
Find Cycle Start
Middle of Linked List
Happy Number
Module Checkpoint: Fast & Slow Pointers
3

Sliding Window

6 lessons

Master the sliding window technique for efficient processing of arrays and strings. Ideal for substring/subarray problems, reducing time complexity from O(n²) to O(n) or O(n log n).

Introduction to Sliding Window
Maximum Sum Subarray of Size K
Smallest Subarray with Given Sum
Longest Substring with K Distinct Characters
Fruits Into Baskets
Module Checkpoint: Sliding Window
4

Merge Intervals

6 lessons

Master interval manipulation problems including merging overlapping intervals, finding intersections, and scheduling. Essential for calendar, scheduling, and range problems.

Introduction to Merge Intervals
Merge Overlapping Intervals
Insert Interval
Interval Intersection
Meeting Rooms
Module Checkpoint: Merge Intervals
5

Cyclic Sort

6 lessons

Master the cyclic sort pattern for sorting numbers in a given range [1..n] in O(n) time without extra space. Perfect for finding missing numbers, duplicates, and other range-based problems.

Introduction to Cyclic Sort
Find Missing Number
Find All Missing Numbers
Find Duplicate Number
Find All Duplicates
Module Checkpoint: Cyclic Sort
6

Linked List Reversal

6 lessons

Master the linked list reversal pattern for reversing entire lists, sublists, and handling k-group reversals. Essential for linked list manipulation problems.

Introduction to Linked List Reversal
Reverse a Linked List
Reverse a Sub-list
Reverse Every K-Element Sub-list
Rotate a Linked List
Module Checkpoint: Linked List Reversal
7

Tree BFS

7 lessons

Master Breadth-First Search (BFS) for tree problems. Learn level-by-level traversal techniques for solving tree problems efficiently.

Introduction to Tree BFS
Binary Tree Level Order Traversal
Reverse Level Order Traversal
Zigzag Traversal
Level Averages
Minimum Depth
Module Checkpoint: Tree BFS
8

Tree DFS

7 lessons

Master Depth-First Search (DFS) for tree problems. Learn recursive and iterative approaches for path-finding, sum problems, and tree traversal patterns.

Introduction to Tree DFS
Binary Tree Path Sum
All Paths for a Sum
Sum of Path Numbers
Path With Given Sequence
Count Paths for a Sum
Module Checkpoint: Tree DFS
9

Two Heaps

5 lessons

Master the Two Heaps pattern for median finding and sliding window problems. Learn how to use max-heap and min-heap together to efficiently track median values.

Introduction to Two Heaps
Find Median of Number Stream
Sliding Window Median
Maximize Capital (IPO)
Module Checkpoint: Two Heaps
10

Subsets

7 lessons

Master the Subsets pattern for generating combinations, permutations, and subsets using BFS/DFS. Essential for problems involving combinations, permutations, and exploring all possible configurations.

Introduction to Subsets
Generate All Subsets
Subsets With Duplicates
Permutations
String Permutations by Changing Case
Balanced Parentheses
Module Checkpoint: Subsets
11

Modified Binary Search

6 lessons

Master the Modified Binary Search pattern for searching in rotated arrays, finding boundaries, and solving search variations. Essential for interview problems involving sorted arrays with twists.

Introduction to Modified Binary Search
Order-Agnostic Binary Search
Search in Rotated Array
Find Minimum in Rotated Array
Find Number in Infinite Array
Module Checkpoint: Modified Binary Search
12

Bitwise XOR

5 lessons

Master the Bitwise XOR pattern for finding single numbers, swapping without temporary variables, and solving unique bit manipulation problems efficiently.

Introduction to Bitwise XOR
Single Number
Two Single Numbers
Flip and Invert Image
Module Checkpoint: Bitwise XOR
13

Top K Elements

6 lessons

Master the Top K Elements pattern using heaps to efficiently find the K largest, smallest, or most frequent elements. Essential for optimization problems involving ranking and selection.

Introduction to Top K Elements
Kth Largest Element in Array
Kth Smallest Element in Sorted Matrix
Find K Closest Points to Origin
Top K Frequent Elements
Module Checkpoint: Top K Elements
14

K-Way Merge

5 lessons

Master the K-Way Merge pattern for efficiently merging K sorted arrays or lists using heaps. Essential for problems involving multiple sorted data sources.

Introduction to K-Way Merge
Merge K Sorted Lists
Kth Smallest Number in M Sorted Lists
Find Smallest Range Covering Elements from K Lists
Module Checkpoint: K-Way Merge
15

Topological Sort

6 lessons

Master the Topological Sort pattern for ordering tasks with dependencies using Kahn's algorithm and DFS. Essential for scheduling, prerequisite problems, and detecting cycles in directed graphs.

Introduction to Topological Sort
Task Scheduling (Valid Order)
Task Scheduling Order (Return Order)
All Tasks Scheduling Orders
Alien Dictionary (Verifying/Changing)
Module Checkpoint: Topological Sort
16

Dynamic Programming

7 lessons

Master the Dynamic Programming pattern for 0/1 Knapsack and related problems. Learn to solve optimization problems by breaking them down into overlapping subproblems with memoization and tabulation.

Introduction to Dynamic Programming
0/1 Knapsack Problem
Equal Subset Sum Partition
Subset Sum Problem
Minimum Subset Sum Difference
Count of Subset Sum
Module Checkpoint: Dynamic Programming
17

Backtracking

6 lessons

Master the Backtracking pattern for solving constraint satisfaction problems. Learn to explore all possible solutions systematically, prune invalid paths early, and solve complex problems like N-Queens, Combination Sum, and Word Search.

Introduction to Backtracking
N-Queens Problem
Combination Sum
Palindrome Partitioning
Word Search (Grid)
Module Checkpoint: Backtracking
18

Trie (Prefix Tree)

5 lessons

Master the Trie data structure for efficient string storage and retrieval. Learn to solve word search, autocomplete, and prefix-matching problems with optimal time complexity.

Introduction to Trie
Implement Trie (Prefix Tree)
Word Search II
Design Add and Search Words Data Structure
Module Checkpoint: Trie
19

Union Find (Disjoint Set)

5 lessons

Master the Union Find pattern for tracking connected components, detecting cycles, and solving dynamic connectivity problems. Essential for graph algorithms and network analysis.

Introduction to Union Find
Number of Provinces
Redundant Connection
Number of Islands II
Module Checkpoint: Union Find
20

Segment Tree

5 lessons

Master the Segment Tree data structure for efficient range queries and updates. Learn to solve range sum, range maximum, and order statistic problems with O(log n) operations.

Introduction to Segment Tree
Range Sum Query - Mutable
Range Maximum Query
Count of Smaller Numbers After Self
Module Checkpoint: Segment Tree