Grokking the Coding Interview: Patterns for Coding Questions
Fast track your coding interview prep by learning coding patterns. Act smartly, and follow the coding patterns.

Course Overview
Coding interviews are getting harder every day. A few years back, brushing up on key data structures and going through 50-75 coding interview questions was more than enough prep for an interview. Today, everyone has access to massive sets of coding problems, and they have gotten more difficult to account for that. The process has gotten more competitive. When our team sat together to brainstorm on ideas to make the interview process easier for candidates, we realized quickly that one skill helped us the most when we were preparing for coding interviews: "the ability to map a new problem to an already known problem." To help candidates with that, we have come up with a list of 27 common coding patterns to help solve coding questions. The idea is, once you are familiar with a pattern, you'll be able to solve dozens of problems with it. The techniques taught in this course have helped developers land jobs in top companies including Google, Facebook, Amazon, and Microsoft.
Course Content
Pattern: Two Pointers
Introduction to Two Pointers Pattern
Pair with Target Sum (easy)
Find Non-Duplicate Number Instances (easy)
Squaring a Sorted Array (easy)
Triplet Sum to Zero (medium)
Triplet Sum Close to Target (medium)
Triplets with Smaller Sum (medium)
Subarrays with Product Less than a Target (medium)
Dutch National Flag Problem (medium)
Problem Challenge 1: Quadruple Sum to Target (medium)
Problem Challenge 2: Comparing Strings containing Backspaces (medium)
Problem Challenge 3: Minimum Window Sort (medium)
Pattern: Fast & Slow Pointers
Introduction to Fast & Slow Pointers Pattern
LinkedList Cycle (easy)
Middle of the LinkedList (easy)
Start of LinkedList Cycle (medium)
Happy Number (medium)
Problem Challenge 1: Palindrome LinkedList (medium)
Problem Challenge 2: Rearrange a LinkedList (medium)
Problem Challenge 3: Cycle in a Circular Array (hard)
Pattern: Sliding Window
Introduction to Sliding Window Pattern
Maximum Sum Subarray of Size K (easy)
Smallest Subarray With a Greater Sum (easy)
Longest Substring with K Distinct Characters (medium)
Fruits into Baskets (medium)
Longest Substring with Same Letters after Replacement (hard)
Longest Subarray with Ones after Replacement (hard)
Problem Challenge 1: Permutation in a String (hard)
Problem Challenge 2: String Anagrams (hard)
Problem Challenge 3: Smallest Window containing Substring (hard)
Problem Challenge 4: Words Concatenation (hard)
Pattern: Merge Intervals
Pattern: Cyclic Sort
Introduction to Cyclic Sort Pattern
Cyclic Sort (easy)
Find the Missing Number (easy)
Find all Missing Numbers (easy)
Find the Duplicate Number (easy)
Find all Duplicate Numbers (easy)
Problem Challenge 1: Find the Corrupt Pair (easy)
Problem Challenge 2: Find the Smallest Missing Positive Number (medium)
Problem Challenge 3: Find the First K Missing Positive Numbers (hard)
Pattern: In-place Reversal of a Linked List
Pattern: Tree Breadth First Search
Introduction to Tree Breadth First Search Pattern
Binary Tree Level Order Traversal (easy)
Reverse Level Order Traversal (easy)
Zigzag Traversal (medium)
Level Averages in a Binary Tree (easy)
Minimum Depth of a Binary Tree (easy)
Level Order Successor (easy)
Connect Level Order Siblings (medium)
Problem Challenge 1: Connect All Level Order Siblings (medium)
Problem Challenge 2: Right View of a Binary Tree (easy)
Pattern: Tree Depth First Search
Pattern: Graphs
Introduction to Graph
Graph Representations
Graph as an Abstract Data Type (ADT)
Graph Traversal - Depth First Search(DFS)
Graph Traversal - Breadth First Search (BFS)
Problem 1: Find if Path Exists in Graph(easy)
Problem 2: Number of Provinces (medium)
Problem 3: Minimum Number of Vertices to Reach All Nodes(medium)
Pattern: Subsets
Introduction to Subsets Pattern
Subsets (easy)
Subsets With Duplicates (easy)
Permutations (medium)
String Permutations by changing case (medium)
Balanced Parentheses (hard)
Unique Generalized Abbreviations (hard)
Problem Challenge 1: Evaluate Expression (hard)
Problem Challenge 2: Structurally Unique Binary Search Trees (hard)
Problem Challenge 3: Count of Structurally Unique Binary Search Trees (hard)
Pattern: Modified Binary Search
Introduction to Modified Binary Search Pattern
Order-agnostic Binary Search (easy)
Ceiling of a Number (medium)
Next Letter (medium)
Number Range (medium)
Search in a Sorted Infinite Array (medium)
Minimum Difference Element (medium)
Bitonic Array Maximum (easy)
Problem Challenge 1: Search Bitonic Array (medium)
Problem Challenge 2: Search in Rotated Array (medium)
Problem Challenge 3: Rotation Count (medium)
Pattern: Top 'K' Elements
Introduction to Top 'K' Elements Pattern
Top 'K' Numbers (easy)
Kth Smallest Number (easy)
'K' Closest Points to the Origin (easy)
Connect Ropes (easy)
Top 'K' Frequent Numbers (medium)
Frequency Sort (medium)
Kth Largest Number in a Stream (medium)
'K' Closest Numbers (medium)
Maximum Distinct Elements (medium)
Sum of Elements (medium)
Rearrange String (hard)
Problem Challenge 1: Rearrange String K Distance Apart (hard)
Problem Challenge 2: Scheduling Tasks (hard)
Problem Challenge 3: Frequency Stack (hard)
Pattern: 0/1 Knapsack (Dynamic Programming)
Pattern: Topological Sort (Graph)
Pattern: Ordered Set
NewPattern: Prefix Sum
NewIntroduction Prefix Sum Pattern
Find the Middle Index in Array (easy)
Left and Right Sum Differences (easy)
Maximum Size Subarray Sum Equals k (medium)
Binary Subarrays With Sum (medium)
Subarray Sums Divisible by K (medium)
Sum of Absolute Differences in a Sorted Array (medium)
Subarray Sum Equals K (medium)
Pattern: Multi-threaded
Miscellaneous
Revision
Test Your Knowledge (Medium)
Daily Temperatures (medium)
Group Anagrams (medium)
Decode String (medium)
Valid Sudoku (medium)
Product of Array Except Self (medium)
Maximum Product Subarray (medium)
Container With Most Water (medium)
Palindromic Substrings (medium)
Remove Nth Node From End of List (medium)
Find Minimum in Rotated Sorted Array (medium)
Pacific Atlantic Water Flow (medium)
Validate Binary Search Tree (medium)
Construct Binary Tree from Preorder and Inorder Traversal (medium)
Clone Graph (medium)
House Robber II (medium)
Decode Ways (medium)
Unique Paths (medium)
Word Break (medium)
Lowest Common Ancestor of a Binary Search Tree (medium)
Longest Consecutive Sequence (medium)
Meeting Rooms II (medium)
Encode and Decode Strings
Number of Connected Components in an Undirected Graph
Graph Valid Tree (medium)
Implement Trie (Prefix Tree) (medium)
Design Add and Search Words Data Structure (medium)
Test Your Knowledge (Hard)
Conclusions
What people say about our courses




About the Author

Arslan Ahmad
Industry Expertise & Leadership
Arslan Ahmad is the lead author of Grokking the Coding Interview: Patterns for Coding Questions. As the founder of Design Gurus and a former FAANG hiring manager, he has worked at industry giants like Facebook (now Meta) and Microsoft.
He has conducted hundreds of system design interviews, giving him unique insight into what top tech companies look for in candidates.
The course also incorporates expertise from senior engineers at Google, Meta, Amazon, Microsoft, and Uber, ensuring you learn system design best practices from professionals who have built and scaled real-world systems.
500+
Interviews Conducted
10k+
Students Taught
Related Courses
$148
$98.9
