Coding Interview Patterns
Coding Interview Patterns
1. Pattern: Sliding Window
- Introduction
- Maximum Sum Subarray of Size K (easy)
- Smallest Subarray with a given sum (easy) Educative.io
- Longest Substring with K Distinct Characters (medium) Educative.io
- Fruits into Baskets (medium) LeetCode
- No-repeat Substring (hard) LeetCode
- Longest Substring with Same Letters after Replacement (hard) LeetCode
- Longest Subarray with Ones after Replacement (hard) LeetCode
- Problem Challenge 1 - Permutation in a String (hard) Leetcode
- Problem Challenge 2 - String Anagrams (hard) Leetcode
- Problem Challenge 3 - Smallest Window containing Substring (hard) Leetcode
- Problem Challenge 4 - Words Concatenation (hard) Leetcode
2. Pattern: Two Pointers
- Introduction
- Pair with Target Sum (easy) LeetCode
- Remove Duplicates (easy) LeetCode LeetCode LeetCode LeetCode LeetCode
- Squaring a Sorted Array (easy) LeetCode
- Triplet Sum to Zero (medium) LeetCode
- Triplet Sum Close to Target (medium) LeetCode
- Triplets with Smaller Sum (medium) LintCode
- Subarrays with Product Less than a Target (medium) LeetCode
- Dutch National Flag Problem (medium) CoderByte
- Problem Challenge 1 - Quadruple Sum to Target (medium) Leetcode
- Problem Challenge 2 - Comparing Strings containing Backspaces (medium) Leetcode
- Problem Challenge 3 - Minimum Window Sort (medium) Leetcode Ideserve
3. Pattern: Fast & Slow pointers
- Introduction emre.me
- LinkedList Cycle (easy) Leetcode
- Start of LinkedList Cycle (medium) Leetcode
- Happy Number (medium) Leetcode
- Middle of the LinkedList (easy) Leetcode
- Problem Challenge 1 - Palindrome LinkedList (medium) Leetcode
- Problem Challenge 2 - Rearrange a LinkedList (medium) Leetcode
- Problem Challenge 3 - Cycle in a Circular Array (hard) Leetcode
4. Pattern: Merge Intervals
- Introduction Educative.io
- Merge Intervals (medium) Educative.io
- Insert Interval (medium) Educative.io
- Intervals Intersection (medium) Educative.io
- Conflicting Appointments (medium) Geeksforgeeks
- Problem Challenge 1 - Minimum Meeting Rooms (hard) Lintcode
- Problem Challenge 2 - Maximum CPU Load (hard) Geeksforgeeks
- Problem Challenge 3 - Employee Free Time (hard) CoderTrain
5. Pattern: Cyclic Sort
- Introduction emre.me
- Cyclic Sort (easy) Geeksforgeeks
- Find the Missing Number (easy) Leetcode
- Find all Missing Numbers (easy) Leetcode
- Find the Duplicate Number (easy) Leetcode
- Find all Duplicate Numbers (easy) Leetcode
- Problem Challenge 1 - Find the Corrupt Pair (easy) TheCodingSimplified
- Problem Challenge 2 - Find the Smallest Missing Positive Number (medium) Leetcode
- Problem Challenge 3 - Find the First K Missing Positive Numbers (hard) TheCodingSimplified
6. Pattern: In-place Reversal of a LinkedList
- Introduction emre.me
- Reverse a LinkedList (easy) Leetcode
- Reverse a Sub-list (medium) Leetcode
- Reverse every K-element Sub-list (medium) Leetcode
- Problem Challenge 1 - Reverse alternating K-element Sub-list (medium) Geeksforgeeks
- Problem Challenge 2 - Rotate a LinkedList (medium) Leetcode
7. Pattern: Tree Breadth First Search
- Introduction
- Binary Tree Level Order Traversal (easy) Leetcode
- Reverse Level Order Traversal (easy) Leetcode
- Zigzag Traversal (medium) Leetcode
- Level Averages in a Binary Tree (easy) Leetcode
- Minimum Depth of a Binary Tree (easy) Leetcode
- Maximum Depth of a Binary Tree (easy) Leetcode
- Level Order Successor (easy) Geeksforgeeks
- Connect Level Order Siblings (medium) Leetcode
- Problem Challenge 1 - Connect All Level Order Siblings (medium) Educative
- Problem Challenge 2 - Right View of a Binary Tree (easy) Leetcode
8. Pattern: Tree Depth First Search
- Introduction
- Binary Tree Path Sum (easy) Leetcode
- All Paths for a Sum (medium) Leetcode
- Sum of Path Numbers (medium) Leetcode
- Path With Given Sequence (medium) Geeksforgeeks
- Count Paths for a Sum (medium) Leetcode
- Problem Challenge 1 - Tree Diameter (medium) Leetcode
- Problem Challenge 2 - Path with Maximum Sum (hard) Leetcode
9. Pattern: Two Heaps
- Introduction
- Find the Median of a Number Stream (medium) Leetcode
- Sliding Window Median (hard)
- Maximize Capital (hard)
10. Pattern: Subsets
- Introduction Educative.io
- Subsets (easy) Educative.io
- Subsets With Duplicates (easy) Educative.io
- Permutations (medium) Educative.io
- String Permutations by changing case (medium)
- Balanced Parentheses (hard)
- Unique Generalized Abbreviations (hard)
11. Pattern: Modified Binary Search
- Introduction
- Order-agnostic Binary Search (easy) Geeksforgeeks
- Ceiling of a Number (medium) Geeksforgeeks-Ceil Geeksforgeeks-Floor
- Next Letter (medium) Leetcode
- Number Range (medium) Leetcode
- Search in a Sorted Infinite Array (medium) Leetcode
- Minimum Difference Element (medium) - Find the floor & ceil take the difference, minimum would be the ans
- Bitonic Array Maximum (easy) Geeksforgeeks
- Problem Challenge 1 - Search Bitonic Array (medium) Leetcode
- Problem Challenge 2 - Search in Rotated Array (medium) Leetcode
- Problem Challenge 3 - Rotation Count (medium) Geeksforgeeks
12. Pattern: Bitwise XOR
- Introduction
- Single Number (easy)
- Two Single Numbers (medium)
- Complement of Base 10 Number (medium)
13. Pattern: Top 'K' Elements
- Introduction
- Top 'K' Numbers (easy)
- Kth Smallest Number (easy)
- 'K' Closest Points to the Origin (easy) Leetcode
- Connect Ropes (easy)
- Top 'K' Frequent Numbers (medium)
- Frequency Sort (medium)
- Kth Largest Number in a Stream (medium) Leetcode
- 'K' Closest Numbers (medium)
- Maximum Distinct Elements (medium)
- Sum of Elements (medium)
- Rearrange String (hard)
14. Pattern: K-way merge
- Introduction
- Merge K Sorted Lists (medium)
- Kth Smallest Number in M Sorted Lists (Medium)
- Kth Smallest Number in a Sorted Matrix (Hard) Educative.io
- Smallest Number Range (Hard)
15. Pattern : 0/1 Knapsack (Dynamic Programming)
- Introduction
- 0/1 Knapsack (medium) Geeksforgeeks
- Equal Subset Sum Partition (medium) Leetcode
- Subset Sum (medium) Geeksforgeeks
- Minimum Subset Sum Difference (hard) Geeksforgeeks
16. Pattern: Topological Sort (Graph)
- Introduction
- Topological Sort (medium) Youtube
- Tasks Scheduling (medium) Leetcode-Similar
- Tasks Scheduling Order (medium) Leetcode-Similar
- All Tasks Scheduling Orders (hard) Leetcode-Similar
- Alien Dictionary (hard) Leetcode
- Problem Challenge 1 - Reconstructing a Sequence (hard) Leetcode
- Problem Challenge 2 - Minimum Height Trees (hard) Leetcode
17. Miscellaneous
- Kth Smallest Number (hard)
18. Conclusions
Where to Go from Here Educative.io