# Coding Interview Patterns

## Coding Interview Patterns

### 1. Pattern: Two Pointers

1. Introduction
2. Pair with Target Sum (easy) [LeetCode](https://leetcode.com/problems/two-sum/)
3. Remove Duplicates (easy) [LeetCode](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) [LeetCode](https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/) [LeetCode](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/) [LeetCode](https://leetcode.com/problems/find-the-duplicate-number/) [LeetCode](https://leetcode.com/problems/duplicate-zeros/)
4. Squaring a Sorted Array (easy) [LeetCode](https://leetcode.com/problems/squares-of-a-sorted-array/)
5. Triplet Sum to Zero (medium) [LeetCode](https://leetcode.com/problems/3sum/)
6. Triplet Sum Close to Target (medium) [LeetCode](https://leetcode.com/problems/3sum-closest/)
7. Triplets with Smaller Sum (medium) [LintCode](https://www.lintcode.com/problem/3sum-smaller/description)
8. Subarrays with Product Less than a Target (medium) [LeetCode](https://leetcode.com/problems/subarray-product-less-than-k/)
9. Dutch National Flag Problem (medium) [CoderByte](https://coderbyte.com/algorithm/dutch-national-flag-sorting-problem)
10. Problem Challenge 1: Quadruple Sum to Target (medium) [Leetcode](https://leetcode.com/problems/4sum/)
11. Problem Challenge 2: Comparing Strings containing Backspaces (medium) [Leetcode](https://leetcode.com/problems/backspace-string-compare/)
12. Problem Challenge 3: Minimum Window Sort (medium) [Leetcode](https://leetcode.com/problems/shortest-unsorted-continuous-subarray/) [Ideserve](https://www.ideserve.co.in/learn/minimum-length-subarray-sorting-which-results-in-sorted-array)

### 2. Pattern: Fast & Slow pointers

1. Introduction [emre.me](https://emre.me/coding-patterns/fast-slow-pointers/)
2. LinkedList Cycle (easy) [Leetcode](https://leetcode.com/problems/linked-list-cycle/)
3. Start of LinkedList Cycle (medium) [Leetcode](https://leetcode.com/problems/linked-list-cycle-ii/)
4. Happy Number (medium) [Leetcode](https://leetcode.com/problems/happy-number/)
5. Middle of the LinkedList (easy) [Leetcode](https://leetcode.com/problems/middle-of-the-linked-list/)
6. Problem Challenge 1: Palindrome LinkedList (medium) [Leetcode](https://leetcode.com/problems/palindrome-linked-list/)
7. Problem Challenge 2: Rearrange a LinkedList (medium) [Leetcode](https://leetcode.com/problems/reorder-list/)
8. Problem Challenge 3: Cycle in a Circular Array (hard) [Leetcode](https://leetcode.com/problems/circular-array-loop/)

### 3. Pattern: Sliding Window

1. Introduction
2. Maximum Sum Subarray of Size K (easy)
3. Smallest Subarray with a given sum (easy) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/7XMlMEQPnnQ)
4. Longest Substring with K Distinct Characters (medium) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/YQQwQMWLx80)
5. Fruits into Baskets (medium) [LeetCode](https://leetcode.com/problems/fruit-into-baskets/)
6. No-repeat Substring (hard) [LeetCode](https://leetcode.com/problems/longest-substring-without-repeating-characters/)
7. Longest Substring with Same Letters after Replacement (hard) [LeetCode](https://leetcode.com/problems/longest-repeating-character-replacement/)
8. Longest Subarray with Ones after Replacement (hard) [LeetCode](https://leetcode.com/problems/max-consecutive-ones-iii/)
9. Problem Challenge 1: Permutation in a String (hard) [Leetcode](https://leetcode.com/problems/permutation-in-string/)
10. Problem Challenge 2: String Anagrams (hard) [Leetcode](https://leetcode.com/problems/find-all-anagrams-in-a-string/)
11. Problem Challenge 3: Smallest Window containing Substring (hard) [Leetcode](https://leetcode.com/problems/minimum-window-substring/)
12. Problem Challenge 4: Words Concatenation (hard) [Leetcode](https://leetcode.com/problems/substring-with-concatenation-of-all-words/)

### 4. Pattern: Merge Intervals

1. Introduction [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/3YVYvogqXpA)
2. Merge Intervals (medium) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/3jyVPKRA8yx)
3. Insert Interval (medium) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/3jKlyNMJPEM)
4. Intervals Intersection (medium) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/JExVVqRAN9D)
5. Conflicting Appointments (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/check-if-any-two-intervals-overlap-among-a-given-set-of-intervals/)
6. Problem Challenge 1: Minimum Meeting Rooms (hard) [Lintcode](https://www.lintcode.com/problem/meeting-rooms-ii/)
7. Problem Challenge 2: Maximum CPU Load (hard) [Geeksforgeeks](https://www.geeksforgeeks.org/maximum-cpu-load-from-the-given-list-of-jobs/)
8. Problem Challenge 3: Employee Free Time (hard) [CoderTrain](https://www.codertrain.co/employee-free-time)

### 5. Pattern: Cyclic Sort

1. Introduction [emre.me](https://emre.me/coding-patterns/cyclic-sort/)
2. Cyclic Sort (easy) [Geeksforgeeks](https://www.geeksforgeeks.org/sort-an-array-which-contain-1-to-n-values-in-on-using-cycle-sort/)
3. Find the Missing Number (easy) [Leetcode](https://leetcode.com/problems/missing-number/)
4. Find all Missing Numbers (easy) [Leetcode](https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/)
5. Find the Duplicate Number (easy) [Leetcode](https://leetcode.com/problems/find-the-duplicate-number/)
6. Find all Duplicate Numbers (easy) [Leetcode](https://leetcode.com/problems/find-all-duplicates-in-an-array/)
7. Problem Challenge 1: Find the Corrupt Pair (easy) [TheCodingSimplified](https://thecodingsimplified.com/find-currupt-pair/)
8. Problem Challenge 2: Find the Smallest Missing Positive Number (medium) [Leetcode](https://leetcode.com/problems/first-missing-positive/)
9. Problem Challenge 3: Find the First K Missing Positive Numbers (hard) [TheCodingSimplified](https://thecodingsimplified.com/find-the-first-k-missing-positive-number/)

### 6. Pattern: In-place Reversal of a LinkedList

1. Introduction [emre.me](https://emre.me/coding-patterns/in-place-reversal-of-a-linked-list/)
2. Reverse a LinkedList (easy) [Leetcode](https://leetcode.com/problems/reverse-linked-list/)
3. Reverse a Sub-list (medium) [Leetcode](https://leetcode.com/problems/reverse-linked-list-ii/)
4. Reverse every K-element Sub-list (medium) [Leetcode](https://leetcode.com/problems/reverse-nodes-in-k-group/)
5. Problem Challenge 1: Reverse alternating K-element Sub-list (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/reverse-alternate-k-nodes-in-a-singly-linked-list/)
6. Problem Challenge 2: Rotate a LinkedList (medium) [Leetcode](https://leetcode.com/problems/rotate-list/)

### 7. Pattern: Stack

1. Introduction to Stack (Operations, Implementation, Applications)
2. Balanced Parentheses [Leetcode](https://leetcode.com/problems/valid-parentheses/description/)
3. Reverse a String
4. Decimal to Binary Conversion
5. Next Greater Element [Leetcode - I](https://leetcode.com/problems/next-greater-element-i/) [Leetcode -II](https://leetcode.com/problems/next-greater-element-ii/) [Leetcode - III (Hard)](https://leetcode.com/problems/next-greater-element-iv/)
6. Sorting a Stack
7. Simplify Path [Leetcode](https://leetcode.com/problems/simplify-path/)

### 8. Pattern: Monotonic Stack

1. Introduction to Monotonic Stack
2. Next Greater Element (easy) [Leetcode - I](https://leetcode.com/problems/next-greater-element-i/) [Leetcode -II](https://leetcode.com/problems/next-greater-element-ii/) [Leetcode - III (Hard)](https://leetcode.com/problems/next-greater-element-iv/)
3. Daily Temperatures (easy) [Leetcode](https://leetcode.com/problems/daily-temperatures/)
4. Remove Nodes From Linked List (easy) [Leetcode](https://leetcode.com/problems/remove-nodes-from-linked-list/)
5. Remove All Adjacent Duplicates In String (easy) [Leetcode](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/)
6. Remove All Adjacent Duplicates in String II (medium) [Leetcode](https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string-ii/)
7. Remove K Digits (hard) [Leetcode](https://leetcode.com/problems/remove-k-digits/)

### 9. Pattern: Hash Maps

1. Introduction (Hashing, Hash Tables, Issues)
2. First Non-repeating Character (easy) [Leetcode](https://leetcode.com/problems/first-unique-character-in-a-string/)
3. Largest Unique Number (easy) [Leetcode+](https://leetcode.com/problems/largest-unique-number/)
4. Maximum Number of Balloons (easy) [Leetcode](https://leetcode.com/problems/maximum-number-of-balloons/)
5. Longest Palindrome(easy) [Leetcode](https://leetcode.com/problems/longest-palindrome/)
6. Ransom Note (easy) [Leetcode](https://leetcode.com/problems/ransom-note/)

### 10. Pattern: Tree Breadth First Search

1. Introduction
2. Binary Tree Level Order Traversal (easy) [Leetcode](https://leetcode.com/problems/binary-tree-level-order-traversal/)
3. Reverse Level Order Traversal (easy) [Leetcode](https://leetcode.com/problems/binary-tree-level-order-traversal-ii/)
4. Zigzag Traversal (medium) [Leetcode](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)
5. Level Averages in a Binary Tree (easy) [Leetcode](https://leetcode.com/problems/average-of-levels-in-binary-tree/)
6. Minimum Depth of a Binary Tree (easy) [Leetcode](https://leetcode.com/problems/minimum-depth-of-binary-tree/)
7. Maximum Depth of a Binary Tree (easy) [Leetcode](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
8. Level Order Successor (easy) [Geeksforgeeks](https://www.geeksforgeeks.org/level-order-successor-of-a-node-in-binary-tree/)
9. Connect Level Order Siblings (medium) [Leetcode](https://leetcode.com/problems/populating-next-right-pointers-in-each-node/)
10. Problem Challenge 1: Connect All Level Order Siblings (medium) [Educative](https://www.educative.io/m/connect-all-siblings)
11. Problem Challenge 2: Right View of a Binary Tree (easy) [Leetcode](https://leetcode.com/problems/binary-tree-right-side-view/)

### 11. Pattern: Tree Depth First Search

1. Introduction
2. Binary Tree Path Sum (easy) [Leetcode](https://leetcode.com/problems/path-sum/)
3. All Paths for a Sum (medium) [Leetcode](https://leetcode.com/problems/path-sum-iii/)
4. Sum of Path Numbers (medium) [Leetcode](https://leetcode.com/problems/sum-root-to-leaf-numbers/)
5. Path With Given Sequence (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/check-root-leaf-path-given-sequence/)
6. Count Paths for a Sum (medium) [Leetcode](https://leetcode.com/problems/path-sum-iii/)
7. Problem Challenge 1: Tree Diameter (medium) [Leetcode](https://leetcode.com/problems/diameter-of-binary-tree/)
8. Problem Challenge 2: Path with Maximum Sum (hard) [Leetcode](https://leetcode.com/problems/binary-tree-maximum-path-sum/)

### 12. Pattern: Graphs

1. Introduction to Graph (Representations, Abstract Data Type (ADT))
2. Graph Traversal: Depth First Search(DFS)
3. Graph Traversal: Breadth First Search (BFS)
4. Find if Path Exists in Graph(easy) [Leetcode](https://leetcode.com/problems/find-if-path-exists-in-graph/)
5. Number of Provinces (medium) [Leetcode](https://leetcode.com/problems/number-of-provinces/)
6. Minimum Number of Vertices to Reach All Nodes(medium) [Leetcode](https://leetcode.com/problems/minimum-number-of-vertices-to-reach-all-nodes/)

### 13. Pattern: Island (Matrix traversal)

1. Introduction to Island Pattern
2. Number of Islands (easy) [Leetcode](https://leetcode.com/problems/number-of-islands/)
3. Biggest Island (easy)
4. Flood Fill (easy) [Leetcode](https://leetcode.com/problems/flood-fill/)
5. Number of Closed Islands (easy) [Leetcode](https://leetcode.com/problems/number-of-closed-islands/)
6. Problem Challenge 1 (easy)
7. Problem Challenge 2 (medium)
8. Problem Challenge 3 (medium)

### 14. Pattern: Two Heaps

1. Introduction
2. Find the Median of a Number Stream (medium) [Leetcode](https://leetcode.com/problems/find-median-from-data-stream/)
3. Sliding Window Median (hard) [Leetcode](https://leetcode.com/problems/sliding-window-median/)
4. Maximize Capital (hard) [Leetcode](https://leetcode.com/problems/ipo/)
5. \**Maximum Sum Combinations* (medium) [InterviewBit](https://www.interviewbit.com/problems/maximum-sum-combinations/)

### 15. Pattern: Subsets

1. Introduction [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/R87WmWYrELz)
2. Subsets (easy) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/gx2OqlvEnWG)
3. Subsets With Duplicates (easy) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/7npk3V3JQNr)
4. Permutations (medium) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/B8R83jyN3KY)
5. String Permutations by changing case (medium)
6. Balanced Parentheses (hard)
7. Unique Generalized Abbreviations (hard) [Leetcode](https://leetcode.com/problems/generalized-abbreviation/)

### [16. Pattern: Modified Binary Search](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/binary-search/BinarySearch.md)

1. Introduction [Complete Pattern Theory and Solutions](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/binary-search/BinarySearch.md)
2. Order-agnostic Binary Search (easy) [Geeksforgeeks](https://www.geeksforgeeks.org/order-agnostic-binary-search/)
3. Ceiling of a Number (medium) [Geeksforgeeks-Ceil](https://www.geeksforgeeks.org/ceiling-in-a-sorted-array/) [Geeksforgeeks-Floor](https://www.geeksforgeeks.org/floor-in-a-sorted-array/)
4. Next Letter (medium) [Leetcode](https://leetcode.com/problems/find-smallest-letter-greater-than-target/)
5. Number Range (medium) [Leetcode](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
6. Search in a Sorted Infinite Array (medium) [Leetcode](https://www.geeksforgeeks.org/find-position-element-sorted-array-infinite-numbers/)
7. Minimum Difference Element (medium): Find the floor & ceil take the difference, minimum would be the ans
8. Bitonic Array Maximum (easy) [Geeksforgeeks](https://www.geeksforgeeks.org/find-the-maximum-element-in-an-array-which-is-first-increasing-and-then-decreasing/)
9. Problem Challenge 1: Search Bitonic Array (medium) [Leetcode](https://leetcode.com/problems/find-in-mountain-array/)
10. Problem Challenge 2: Search in Rotated Array (medium) [Leetcode](https://leetcode.com/problems/search-in-rotated-sorted-array/)
11. Problem Challenge 3: Rotation Count (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/find-rotation-count-rotated-sorted-array/)
12. \*Search a 2D Matrix (medium) [Leetcode](https://leetcode.com/problems/search-a-2d-matrix/)
13. \*Minimum Number of Days to Make m Bouquets (medium) [Leetcode](https://leetcode.com/problems/minimum-number-of-days-to-make-m-bouquets/)
14. \*Koko Eating Bananas (medium) [Leetcode](https://leetcode.com/problems/koko-eating-bananas/)
15. \*Capacity To Ship Packages Within D Days (medium) [Leetcode](https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/)
16. \*Median of Two Sorted Arrays (hard) [Leetcode](https://leetcode.com/problems/median-of-two-sorted-arrays/)

### 17. Pattern: Bitwise XOR

1. Introduction
2. Single Number (easy)
3. Two Single Numbers (medium)
4. Complement of Base 10 Number (medium)
5. Problem Challenge 1: Flip and Invert an Image (hard)

### 18. Pattern: Top 'K' Elements

1. [Introduction](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/13.-pattern-top-k-elements/01.Introduction.md)
2. Top 'K' Numbers (easy) [Solution](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/13.-pattern-top-k-elements/02.top-k-numbers.md)
3. Kth Smallest Number (easy)
4. 'K' Closest Points to the Origin (easy) [Leetcode](https://leetcode.com/problems/k-closest-points-to-origin/)
5. Connect Ropes (easy)
6. Top 'K' Frequent Numbers (medium)
7. Frequency Sort (medium)
8. Kth Largest Number in a Stream (medium) [Leetcode](https://leetcode.com/problems/kth-largest-element-in-a-stream/)
9. 'K' Closest Numbers (medium)
10. Maximum Distinct Elements (medium)
11. Sum of Elements (medium)
12. Rearrange String (hard)<br>
13. Problem Challenge 1: Rearrange String K Distance Apart (hard)
14. Problem Challenge 2: Scheduling Tasks (hard)
15. Problem Challenge 3: Frequency Stack (hard)
16. \*[*Heap Implementation*](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/13.-pattern-top-k-elements/13.HeapImplementation.md)

### 19. Pattern: K-way merge

1. Introduction
2. Merge K Sorted Lists (medium) [Leetcode](https://leetcode.com/problems/merge-k-sorted-lists/)
3. Kth Smallest Number in M Sorted Lists (Medium) [Geeksforgeeks](https://www.geeksforgeeks.org/find-m-th-smallest-value-in-k-sorted-arrays/)
4. Kth Smallest Number in a Sorted Matrix (Hard) [Educative.io](https://www.educative.io/courses/grokking-the-coding-interview/x1NJVYKNvqz)
5. Smallest Number Range (Hard) [Leetcode](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/)
6. Problem Challenge 1: K Pairs with Largest Sums (hard)

### 20. Pattern: Greedy Algorithms

1. Introduction to Greedy Algorithm
2. Valid Palindrome II (easy) [Leetcode](https://leetcode.com/problems/valid-palindrome-ii/)
3. Maximum Length of Pair Chain (medium) [Leetcode](https://leetcode.com/problems/maximum-length-of-pair-chain/)
4. Minimum Add to Make Parentheses Valid (medium) [Leetcode](https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/)
5. Remove Duplicate Letters (medium) [Leetcode](https://leetcode.com/problems/remove-duplicate-letters/)
6. Largest Palindromic Number (Medium) [Leetcode](https://leetcode.com/problems/largest-palindromic-number/)
7. Removing Minimum and Maximum From Array (medium) [Leetcode](https://leetcode.com/problems/removing-minimum-and-maximum-from-array/)

### 21. Pattern : 0/1 Knapsack (Dynamic Programming)

1. Introduction
2. 0/1 Knapsack (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/)
3. Equal Subset Sum Partition (medium) [Leetcode](https://leetcode.com/problems/partition-equal-subset-sum/)
4. Subset Sum (medium) [Geeksforgeeks](https://www.geeksforgeeks.org/subset-sum-problem-dp-25/)
5. Minimum Subset Sum Difference (hard) [Geeksforgeeks](https://www.geeksforgeeks.org/partition-a-set-into-two-subsets-such-that-the-difference-of-subset-sums-is-minimum/)
6. Problem Challenge 1: Count of Subset Sum (hard)
7. Problem Challenge 2: Target Sum (hard)

### 22. Pattern: Backtracking

1. Introduction to Backtracking Pattern
2. Combination Sum (medium) [Leetcode - I](https://leetcode.com/problems/combination-sum/) [Leetcode - II](https://leetcode.com/problems/combination-sum-ii/) [Leetcode - III](https://leetcode.com/problems/combination-sum-iii/) [Leetcode - IV](https://leetcode.com/problems/combination-sum-iv/)
3. Word Search (medium) [Leetcode - I](https://leetcode.com/problems/word-search/) [Leetcode - II (Hard)](https://leetcode.com/problems/word-search-ii/)
4. Sudoku Solver (hard) [Leetcode](https://leetcode.com/problems/sudoku-solver/)
5. Factor Combinations (medium) [Leetcode+](https://leetcode.com/problems/factor-combinations/)
6. Split a String Into the Max Number of Unique Substrings (medium) [Leetcode](https://leetcode.com/problems/split-a-string-into-the-max-number-of-unique-substrings/)

### 23. Pattern: Trie

1. Introduction to Trie
2. Implement Trie (Prefix Tree) (medium) [Leetcode](https://leetcode.com/problems/implement-trie-prefix-tree/)
3. Index Pairs of a String (easy) [Leetcode+](https://leetcode.com/problems/index-pairs-of-a-string/)
4. Design Add and Search Words Data Structure (medium) [Leetcode](https://leetcode.com/problems/design-add-and-search-words-data-structure/)
5. Extra Characters in a String (medium) [Leetcode](https://leetcode.com/problems/extra-characters-in-a-string/)
6. Search Suggestions System (medium) [Leetcode](https://leetcode.com/problems/search-suggestions-system/)

### 24. Pattern: Topological Sort (Graph)

1. Introduction
2. Topological Sort (medium) [Youtube](https://www.youtube.com/watch?v=cIBFEhD77b4)
3. Tasks Scheduling (medium) [Leetcode-Similar](https://leetcode.com/problems/course-schedule/)
4. Tasks Scheduling Order (medium) [Leetcode-Similar](https://leetcode.com/problems/course-schedule/)
5. All Tasks Scheduling Orders (hard) [Leetcode-Similar](https://leetcode.com/problems/course-schedule-ii/)
6. Alien Dictionary (hard) [Leetcode](https://leetcode.com/problems/alien-dictionary/)
7. Problem Challenge 1: Reconstructing a Sequence (hard) [Leetcode](https://leetcode.com/problems/sequence-reconstruction/)
8. Problem Challenge 2: Minimum Height Trees (hard) [Leetcode](https://leetcode.com/problems/minimum-height-trees/)

### 25. Pattern: Union Find

1. Introduction to Union Find Pattern
2. Redundant Connection (medium) [Leetcode - I](https://leetcode.com/problems/redundant-connection/) [Leetcode - II (Hard)](https://leetcode.com/problems/redundant-connection-ii/)
3. Number of Provinces (medium) [Leetcode](https://leetcode.com/problems/number-of-provinces/)
4. Is Graph Bipartite? (medium) [Leetcode](https://leetcode.com/problems/is-graph-bipartite/)
5. Path With Minimum Effort (medium) [Leetcode](https://leetcode.com/problems/path-with-minimum-effort/)

### 26. Ordered Set

1. Introduction to Ordered Set Pattern
2. Merge Similar Items (easy) [Leetcode](https://leetcode.com/problems/merge-similar-items/)
3. 132 Pattern (medium) [Leetcode](https://leetcode.com/problems/132-pattern/)
4. My Calendar I (medium) [Leetcode](https://leetcode.com/problems/my-calendar-i/) [Leetcode - II](https://leetcode.com/problems/my-calendar-ii/) [Leetcode - III (Hard)](https://leetcode.com/problems/my-calendar-iii/)
5. Longest Continuous Subarray (medium)

### 27. Pattern: Multi-thread

1. Introduction to Multi-threaded Pattern
2. Same Tree (medium)
3. Invert Binary Tree (medium)
4. Binary Search Tree Iterator (medium)

### 28. Miscellaneous

1. Kth Smallest Number (hard)

### Revision

1. [Coding Patterns: A Cheat Sheet](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/revision/Revision.md)

### Test Your Knowledge

1. [Easy Problems](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/test-your-knowledge/1.EasyProblems.md)
2. [Medium Problems](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/test-your-knowledge/2.MediumProblems.md)
3. [Hard Problems](https://github.com/dipjul/Grokking-the-Coding-Interview-Patterns-for-Coding-Questions/blob/master/test-your-knowledge/3.HardProblems.md)

> ***Note:*** Problems marked with `*` are added as per my recommendations.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dvpr.gitbook.io/coding-interview-patterns/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
