Grokking the Coding Interview: Patterns for Coding Questions
Master the coding interview by learning coding patterns. Act smartly, and follow the coding patterns.
Level:
Intermediate
Study Time:
271h
Lessons:
416
Playgrounds :
445
211,991 (Students)
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've 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've come up with a list of 20 patterns for coding questions, based on similarities in the techniques needed to solve them. As a result, once you're 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.
Get instant access to all current and upcoming courses through subscription.
$19
.99
/mo
billed yearly ($239)
OR
Get Lifetime access to this course only.
$79
Certification on completing the course.
Course Content
• 30 Chapters • 416 Lessons
3.
Pattern: Two Pointers
23 lessons
Introduction to Two Pointers Pattern
Pair with Target Sum (easy)
Solution: Pair with Target Sum
Find Non-Duplicate Number Instances (easy)
Solution: Find Non-Duplicate Number Instances
Squaring a Sorted Array (easy)
Solution: Squaring a Sorted Array
Triplet Sum to Zero (medium)
Solution: Triplet Sum to Zero
Triplet Sum Close to Target (medium)
Solution: Triplet Sum Close to Target
Triplets with Smaller Sum (medium)
Solution: Triplets with Smaller Sum
Subarrays with Product Less than a Target (medium)
Solution: Subarrays with Product Less than a Target
Dutch National Flag Problem (medium)
Solution: Dutch National Flag Problem
Problem Challenge 1: Quadruple Sum to Target (medium)
Solution: Problem Challenge 1: Quadruple Sum to Target
Problem Challenge 2: Comparing Strings containing Backspaces (medium)
Solution: Problem Challenge 2: Comparing Strings containing Backspaces
Problem Challenge 3: Minimum Window Sort (medium)
Solution: Problem Challenge 3: Minimum Window Sort
4.
Pattern: Fast & Slow Pointers
15 lessons
Introduction to Fast & Slow Pointers Pattern
LinkedList Cycle (easy)
Solution: LinkedList Cycle
Middle of the LinkedList (easy)
Solution: Middle of the LinkedList
Start of LinkedList Cycle (medium)
Solution: Start of LinkedList Cycle
Happy Number (medium)
Solution: Happy Number
Problem Challenge 1: Palindrome LinkedList (medium)
Solution: Problem Challenge 1: Palindrome LinkedList
Problem Challenge 2: Rearrange a LinkedList (medium)
Solution: Problem Challenge 2: Rearrange a LinkedList
Problem Challenge 3: Cycle in a Circular Array (hard)
Solution: Problem Challenge 3: Cycle in a Circular Array
5.
Pattern: Sliding Window
21 lessons
Introduction to Sliding Window Pattern
Maximum Sum Subarray of Size K (easy)
Solution: Maximum Sum Subarray of Size K
Smallest Subarray With a Greater Sum (easy)
Solution: Smallest Subarray With a Greater Sum
Longest Substring with K Distinct Characters (medium)
Solution: Longest Substring with K Distinct Characters
Fruits into Baskets (medium)
Solution: Fruits into Baskets
Longest Substring with Same Letters after Replacement (hard)
Solution: Longest Substring with Same Letters after Replacement
Longest Subarray with Ones after Replacement (hard)
Solution: Longest Subarray with Ones after Replacement
Problem Challenge 1: Permutation in a String (hard)
Solution: Problem Challenge 1: Permutation in a String
Problem Challenge 2: String Anagrams (hard)
Solution: Problem Challenge 2: String Anagrams
Problem Challenge 3: Smallest Window containing Substring (hard)
Solution: Problem Challenge 3: Smallest Window containing Substring
Problem Challenge 4: Words Concatenation (hard)
Solution: Problem Challenge 4: Words Concatenation
6.
Pattern: Merge Intervals
15 lessons
Introduction to Merge Intervals Pattern
Merge Intervals (medium)
Solution: Merge Intervals
Insert Interval (medium)
Solution: Insert Interval
Intervals Intersection (medium)
Solution: Intervals Intersection
Conflicting Appointments (medium)
Solution: Conflicting Appointments
Problem Challenge 1: Minimum Meeting Rooms (hard)
Solution: Problem Challenge 1: Minimum Meeting Rooms
Problem Challenge 2: Maximum CPU Load (hard)
Solution: Problem Challenge 2: Maximum CPU Load
Problem Challenge 3: Employee Free Time (hard)
Solution: Problem Challenge 3: Employee Free Time
7.
Pattern: Cyclic Sort
17 lessons
Introduction to Cyclic Sort Pattern
Cyclic Sort (easy)
Solution: Cyclic Sort
Find the Missing Number (easy)
Solution: Find the Missing Number
Find all Missing Numbers (easy)
Solution: Find all Missing Numbers
Find the Duplicate Number (easy)
Solution: Find the Duplicate Number
Find all Duplicate Numbers (easy)
Solution: Find all Duplicate Numbers
Problem Challenge 1: Find the Corrupt Pair (easy)
Solution: Problem Challenge 1: Find the Corrupt Pair
Problem Challenge 2: Find the Smallest Missing Positive Number (medium)
Solution: Problem Challenge 2: Find the Smallest Missing Positive Number
Problem Challenge 3: Find the First K Missing Positive Numbers (hard)
Solution: Problem Challenge 3: Find the First K Missing Positive Numbers
8.
Pattern: In-place Reversal of a Linked List
11 lessons
Introduction to In-place Reversal of a Linked List Pattern
Reverse a LinkedList (easy)
Solution: Reverse a LinkedList
Reverse a Sub-list (medium)
Solution: Reverse a Sub-list
Reverse every K-element Sub-list (medium)
Solution: Reverse every K-element Sub-list
Problem Challenge 1: Reverse alternating K-element Sub-list (medium)
Solution: Problem Challenge 1: Reverse alternating K-element Sub-list
Problem Challenge 2: Rotate a LinkedList (medium)
Solution: Problem Challenge 2: Rotate a LinkedList
9.
Pattern: Monotonic Stack (*NEW*)
13 lessons
Introduction to Monotonic Stack
Next Greater Element (easy)
Solution: Next Greater Element
Daily Temperatures (easy)
Solution: Daily Temperatures
Remove Nodes From Linked List (easy)
Solution: Remove Nodes From Linked List
Remove All Adjacent Duplicates In String (easy)
Solution: Remove All Adjacent Duplicates In String
Remove All Adjacent Duplicates in String II (medium)
Solution: Remove All Adjacent Duplicates in String II
Remove K Digits (hard)
Solution: Remove K Digits
10.
Pattern: Tree Breadth First Search
19 lessons
Introduction to Tree Breadth First Search Pattern
Binary Tree Level Order Traversal (easy)
Solution: Binary Tree Level Order Traversal
Reverse Level Order Traversal (easy)
Solution: Reverse Level Order Traversal
Zigzag Traversal (medium)
Solution: Zigzag Traversal
Level Averages in a Binary Tree (easy)
Solution: Level Averages in a Binary Tree
Minimum Depth of a Binary Tree (easy)
Solution: Minimum Depth of a Binary Tree
Level Order Successor (easy)
Solution: Level Order Successor
Connect Level Order Siblings (medium)
Solution: Connect Level Order Siblings
Problem Challenge 1: Connect All Level Order Siblings (medium)
Solution: Problem Challenge 1: Connect All Level Order Siblings
Problem Challenge 2: Right View of a Binary Tree (easy)
Solution: Problem Challenge 2: Right View of a Binary Tree
11.
Pattern: Tree Depth First Search
15 lessons
Introduction to Tree Depth First Search Pattern
Binary Tree Path Sum (easy)
Solution: Binary Tree Path Sum
All Paths for a Sum (medium)
Solution: All Paths for a Sum
Sum of Path Numbers (medium)
Solution: Sum of Path Numbers
Path With Given Sequence (medium)
Solution: Path With Given Sequence
Count Paths for a Sum (medium)
Solution: Count Paths for a Sum
Problem Challenge 1: Tree Diameter (medium)
Solution: Problem Challenge 1: Tree Diameter
Problem Challenge 2: Path with Maximum Sum (hard)
Solution: Problem Challenge 2: Path with Maximum Sum
12.
Pattern: Island (Matrix Traversal) *NEW*
15 lessons
Introduction to Island Pattern
Number of Islands (easy)
Solution: Number of Islands
Biggest Island (easy)
Solution: Biggest Island
Flood Fill (easy)
Solution: Flood Fill
Number of Closed Islands (easy)
Solution: Number of Closed Islands
Problem Challenge 1 (easy)
Solution: Problem Challenge 1
Problem Challenge 2 (medium)
Solution: Problem Challenge 2
Problem Challenge 3 (medium)
Solution: Problem Challenge 3
13.
Pattern: Two Heaps
9 lessons
Introduction to Two Heaps Pattern
Find the Median of a Number Stream (medium)
Solution: Find the Median of a Number Stream
Sliding Window Median (hard)
Solution: Sliding Window Median
Maximize Capital (hard)
Solution: Maximize Capital
Problem Challenge 1: Next Interval (hard)
Solution: Problem Challenge 1: Next Interval
14.
Pattern: Subsets
19 lessons
Introduction to Subsets Pattern
Subsets (easy)
Solution: Subsets
Subsets With Duplicates (easy)
Solution: Subsets With Duplicates
Permutations (medium)
Solution: Permutations
String Permutations by changing case (medium)
Solution: String Permutations by changing case
Balanced Parentheses (hard)
Solution: Balanced Parentheses
Unique Generalized Abbreviations (hard)
Solution: Unique Generalized Abbreviations
Problem Challenge 1: Evaluate Expression (hard)
Solution: Problem Challenge 1: Evaluate Expression
Problem Challenge 2: Structurally Unique Binary Search Trees (hard)
Solution: Problem Challenge 2: Structurally Unique Binary Search Trees
Problem Challenge 3: Count of Structurally Unique Binary Search Trees (hard)
Solution: Problem Challenge 3: Count of Structurally Unique Binary Search Trees
15.
Pattern: Modified Binary Search
21 lessons
Introduction to Modified Binary Search Pattern
Order-agnostic Binary Search (easy)
Solution: Order-agnostic Binary Search
Ceiling of a Number (medium)
Solution: Ceiling of a Number
Next Letter (medium)
Solution: Next Letter
Number Range (medium)
Solution: Number Range
Search in a Sorted Infinite Array (medium)
Solution: Search in a Sorted Infinite Array
Minimum Difference Element (medium)
Solution: Minimum Difference Element
Bitonic Array Maximum (easy)
Solution: Bitonic Array Maximum
Problem Challenge 1: Search Bitonic Array (medium)
Solution: Problem Challenge 1: Search Bitonic Array
Problem Challenge 2: Search in Rotated Array (medium)
Solution: Problem Challenge 2: Search in Rotated Array
Problem Challenge 3: Rotation Count (medium)
Solution: Problem Challenge 3: Rotation Count
16.
Pattern: Bitwise XOR
9 lessons
Introduction to Bitwise XOR Pattern
Single Number (easy)
Solution: Single Number
Two Single Numbers (medium)
Solution: Two Single Numbers
Complement of Base 10 Number (medium)
Solution: Complement of Base 10 Number
Problem Challenge 1: Flip and Invert an Image (hard)
Solution: Problem Challenge 1: Flip and Invert an Image
17.
Pattern: Top 'K' Elements
29 lessons
Introduction to Top 'K' Elements Pattern
Top 'K' Numbers (easy)
Solution: Top 'K' Numbers
Kth Smallest Number (easy)
Solution: Kth Smallest Number
'K' Closest Points to the Origin (easy)
Solution: 'K' Closest Points to the Origin
Connect Ropes (easy)
Solution: Connect Ropes
Top 'K' Frequent Numbers (medium)
Solution: Top 'K' Frequent Numbers
Frequency Sort (medium)
Solution: Frequency Sort
Kth Largest Number in a Stream (medium)
Solution: Kth Largest Number in a Stream
'K' Closest Numbers (medium)
Solution: 'K' Closest Numbers
Maximum Distinct Elements (medium)
Solution: Maximum Distinct Elements
Sum of Elements (medium)
Solution: Sum of Elements
Rearrange String (hard)
Solution: Rearrange String
Problem Challenge 1: Rearrange String K Distance Apart (hard)
Solution: Problem Challenge 1: Rearrange String K Distance Apart
Problem Challenge 2: Scheduling Tasks (hard)
Solution: Problem Challenge 2: Scheduling Tasks
Problem Challenge 3: Frequency Stack (hard)
Solution: Problem Challenge 3: Frequency Stack
18.
Pattern: K-way Merge
11 lessons
Introduction to K-way Merge Pattern
Merge K Sorted Lists (medium)
Solution: Merge K Sorted Lists
Kth Smallest Number in M Sorted Lists (medium)
Solution: Kth Smallest Number in M Sorted Lists
Kth Smallest Number in a Sorted Matrix (hard)
Solution: Kth Smallest Number in a Sorted Matrix
Smallest Number Range (hard)
Solution: Smallest Number Range
Problem Challenge 1: K Pairs with Largest Sums (hard)
Solution: Problem Challenge 1: K Pairs with Largest Sum
19.
Pattern: 0/1 Knapsack (Dynamic Programming)
13 lessons
Introduction to 0/1 Knapsack Pattern
0/1 Knapsack (medium)
Solution: 0/1 Knapsack
Equal Subset Sum Partition (medium)
Solution: Equal Subset Sum Partition
Subset Sum (medium)
Solution: Subset Sum
Minimum Subset Sum Difference (hard)
Solution: Minimum Subset Sum Difference
Problem Challenge 1: Count of Subset Sum (hard)
Solution: Problem Challenge 1: Count of Subset Sum
Problem Challenge 2: Target Sum (hard)
Solution: Problem Challenge 2: Target Sum
20.
Pattern: Backtracking
11 lessons
Introduction to Backtracking Pattern
Combination Sum (medium)
Solution: Combination Sum
Word Search (medium)
Solution: Word Search
Sudoku Solver (hard)
Solution: Sudoku Solver
Factor Combinations (medium)
Solution: Factor Combinations
Split a String Into the Max Number of Unique Substrings (medium)
Solution: Split a String Into the Max Number of Unique Substrings
21.
Pattern: Topological Sort (Graph)
15 lessons
Introduction to Topological Sort Pattern
Topological Sort (medium)
Solution: Topological Sort
Tasks Scheduling (medium)
Solution: Tasks Scheduling
Tasks Scheduling Order (medium)
Solution: Tasks Scheduling Order
All Tasks Scheduling Orders (hard)
Solution: All Tasks Scheduling Orders
Alien Dictionary (hard)
Solution: Alien Dictionary
Problem Challenge 1: Reconstructing a Sequence (hard)
Solution: Problem Challenge 1: Reconstructing a Sequence
Problem Challenge 2: Minimum Height Trees (hard)
Solution: Problem Challenge 2: Minimum Height Trees
22.
Pattern: Union Find (*NEW*)
9 lessons
25.
Miscellaneous
2 lessons
26.
Revision
1 lesson
27.
Test Your Knowledge (Easy)
11 lessons
28.
Test Your Knowledge (Medium)
52 lessons
Daily Temperatures (Medium)
Solution: Daily Temperatures
Group Anagrams (Medium)
Solution: Group Anagrams
Decode String (Medium)
Solution: Decode String
Valid Sudoku (Medium)
Solution: Valid Sudoku
Product of Array Except Self (Medium)
Solution: Product of Array Except Self
Maximum Product Subarray (Medium)
Solution: Maximum Product Subarray
Container With Most Water (Medium)
Solution: Container With Most Water
Palindromic Substrings (Medium)
Solution: Palindromic Substrings
Remove Nth Node From End of List (Medium)
Solution: Remove Nth Node From End of List
Find Minimum in Rotated Sorted Array (Medium)
Solution: Find Minimum in Rotated Sorted Array
Pacific Atlantic Water Flow (Medium)
Solution: Pacific Atlantic Water Flow
Validate Binary Search Tree (medium)
Solution: Validate Binary Search Tree
Construct Binary Tree from Preorder and Inorder Traversal (medium)
Solution: Construct Binary Tree from Preorder and Inorder Traversal
Clone Graph (medium)
Solution: Clone Graph
House Robber II (medium)
Solution: House Robber II
Decode Ways (medium)
Solution: Decode Ways
Unique Paths (medium)
Solution: Unique Paths
Word Break (medium)
Solution: Word Break
Lowest Common Ancestor of a Binary Search Tree (medium)
Solution: Lowest Common Ancestor of a Binary Search Tree
Longest Consecutive Sequence (medium)
Solution: Longest Consecutive Sequence
Meeting Rooms II (medium)
Solution: Meeting Rooms II
Encode and Decode Strings
Solution: Encode and Decode Strings
Number of Connected Components in an Undirected Graph
Solution: Number of Connected Components in an Undirected Graph
Graph Valid Tree (medium)
Solution: Graph Valid Tree
Implement Trie (Prefix Tree) (medium)
Solution: Implement Trie (Prefix Tree)
Design Add and Search Words Data Structure (medium)
Solution: Design Add and Search Words Data Structure
30.
Conclusions
1 lesson
What people say about our courses

Ashley Pean
Software Engineer
Check out Grokking the Coding Interview. Instead of trying out random Algos, they break down the patterns you need to solve them. Helps immensely with retention!

Simon Barker
Software Engineer
This is what I love about http://designgurus.io’s Grokking the coding interview course. They teach patterns rather than solutions.

Roger Cruz
Software Engineer
The world gets better inch by inch when you help someone else. If you haven't tried Grokking The Coding Interview, check it out, it's a great resource!

pikacodes
Software Engineer
I've tried every possible resource (Blind 75, Neetcode, YouTube, Cracking the Coding Interview, Udemy) and idk if it was just the right time or everything finally clicked but everything's been so easy to grasp recently with Grokking the Coding Interview!

Matzuk
Software Engineer
Algorithms can be daunting, but they're less so with the right guide. This course - https://www.designgurus.io/course/grokking-the-coding-interview, is a great starting point. It covers typical problems you might encounter in interviews.

Tonya Sims
Software Engineer
DesignGurus.io "Grokking the Coding Interview". One of the best resources I’ve found for learning the major patterns behind solving coding problems.

MO JAFRI
Software Engineer
The courses which have "grokking" before them, are exceptionally well put together! These courses magically condense 3 years of CS in short bite-size courses and lectures (I have tried System Design, OODI, and Coding patterns). The Grokking courses are godsent, to be honest.

ABHISHEK GUPTA
Software Engineer
My offer from the top tech company would not have been possible without this course. Many thanks!!

KAUSHIK JONNADULA
Software Engineer
Thanks for a great resource! You guys are a lifesaver. I struggled a lot in design interviews, and this course gave me an organized process to handle a design problem. Please keep adding more questions.

AHMET HANIF
Software Engineer
Whoever put this together, you folks are life savers. Thank you :)
Get instant access to all current and upcoming courses through subscription.
$19
.99
/mo
billed yearly ($239)
OR
Get Lifetime access to this course only.
$79
Certification on completing the course.