The purpose of this repo is twofold: one, to give you a single canonical listing of everything you will be learning in the class, and two, to give you a structured approach to review what you have learned. If you find yourself unsure about what you should be studying, check here!
https://www.udemy.com/course/master-the-coding-interview-big-tech-faang-interviews
Foundation of Big-O notation, Arrays, Strings, LinkedList, Trees, Graphs, 2D-Matrix, Dynamic Programming
We will Cover the following 30 Problems.
- Question #1 Google Interview Question Two Sum (Easy)
- Question #2 Container With Most Water (Medium)
- Question #3 Trapping Rainwater (Hard)
- Question #4 Backspace String Compare (Easy)
- Question #5 Longest Substring Without Repeating Characters (Medium)
- Question #6a Valid Palindrome(Easy)
- Question #6b Almost Palindrome (Easy)
- Question #7 M, N Reversals (Medium)
- Question #8 Merge Multi-Level Doubly Linked List (Medium)
- Question #9 Cycle Detection (Medium)
- Question #10 Valid Parentheses (Easy)
- Question #11 Minimum Brackets To Remove To Make Valid (Medium)
- Question #12 Implement Queue With Stacks (Easy)
- Question #13 Kth Largest Element (Medium)
- Question #14 Start And End Of Target (Medium)
- Question #15 Maximum Depth Of Binary Tree (Easy)
- Question #16 Level Order Of Binary Tree (Medium)
- Question #17 Right Side View of Tree (Medium)
- Question #18 Number Of Nodes In Complete Tree (Medium)
- Question #19 Validate Binary Search Tree (Medium)
- Question #20 Number Of Islands (Medium)
- Question #21 Rotting Oranges (Medium)
- Question #22 Walls And Gates (Medium)
- Question #23 Time Needed To Inform All Employees (Medium)
- Question #24 Course Scheduler (Medium)
- Question #25 Network Time Delay (Medium)
- Question #26 Minimum Cost Of Climbing Stairs (Easy)
- Question #27 Knight Probability In Chessboard (Medium)
- Question #28 Sudoku Solver (Hard)
- Question #29 Monarchy (Medium)
- Question #30 Implement Prefix Trie (Medium)
https://www.educative.io/courses/grokking-the-coding-interview
We will Cover 14 Paterns to help with pattern matching.
- Maximum Sum Subarray of Size K (easy): new (link)
- Smallest Subarray with a given sum (easy): LC 209
- Longest Substring with K Distinct Characters (medium): LC 340
- Fruits into Baskets (medium): LC 904
- No-repeat Substring (hard): LC 3
- Longest Substring with Same Letters after Replacement (hard)
- LC 424 Longest Subarray with Ones after Replacement (hard)
- LC 1004 Problem Challenge 1: LC 567
- Problem Challenge 2: LC 438
- Problem Challenge 3: LC 76
- Problem Challenge 4: LC 30
- Pair with Target Sum (easy): LC1
- Remove Duplicates (easy): LC 26
- Squaring a Sorted Array (easy): LC 977
- Triplet Sum to Zero (medium): LC 15
- Triplet Sum Close to Target (medium): LC 16
- Triplets with Smaller Sum (medium): LC 259
- Subarrays with Product Less than a Target (medium): LC 713
- Dutch National Flag Problem (medium): LC 75
- Problem Challenge 1: LC 18
- Problem Challenge 2: LC 844
- Problem Challenge 3: LC 581
- LinkedList Cycle (easy): LC 141
- Start of LinkedList Cycle (medium): LC 142
- Happy Number (medium): LC 202
- Middle of the LinkedList (easy): LC 876
- Problem Challenge 1: LC 234
- Problem Challenge 2: LC 143
- Problem Challenge 3: LC 457
- Merge Intervals (medium): LC 56
- Insert Interval (medium): LC 57
- Intervals Intersection (medium): LC 986
- Conflicting Appointments (medium): LC 252
- Problem Challenge 1: LC 253
- Problem Challenge 2: new (link)
- Problem Challenge 3: LC 759
- Cyclic Sort (easy): new (link)
- Find the Missing Number (easy): LC 268 Find all Missing Numbers (easy): LC 448 Find the Duplicate Number (easy): LC 287 Find all Duplicate Numbers (easy): LC 442 Problem Challenge 1: LC 645
- Problem Challenge 2: LC 41
- Problem Challenge 3: new (link)
- Reverse a LinkedList (easy): LC 206
- Reverse a Sub-list (medium): LC 92
- Reverse every K-element Sub-list (medium): LC 25 Problem Challenge 1: new (link)
- Problem Challenge 2: LC 61
- Binary Tree Level Order Traversal (easy): LC 102 Reverse Level Order Traversal (easy): LC 107
- Zigzag Traversal (medium): LC 103
- Level Averages in a Binary Tree (easy): LC 637 Minimum Depth of a Binary Tree (easy): LC 111, LC 104 Level Order Successor (easy): new (link)
- Connect Level Order Siblings (medium): LC 117 Problem Challenge 1: new (link)
- Problem Challenge 2: LC 199
- Binary Tree Path Sum (easy): LC 112
- All Paths for a Sum (medium): LC 113, LC 257, new (link) Sum of Path Numbers (medium): LC 129
- Path With Given Sequence (medium): LC 1430
- Count Paths for a Sum (medium): LC 437
- Problem Challenge 1: LC 543
- Problem Challenge 2: LC 124
- Find the Median of a Number Stream (medium): LC 295 Sliding Window Median (hard): LC 480
- Maximize Capital (hard): LC 502
- Problem Challenge 1: LC 436
- Subsets (easy): LC 78
- Subsets With Duplicates (easy): LC 90
- Permutations (medium): LC 46
- String Permutations by changing case (medium): LC 784 Balanced Parentheses (hard): LC 22
- Unique Generalized Abbreviations (hard): LC 320 Problem Challenge 1: LC 241
- Problem Challenge 2: LC 95
- Problem Challenge 3: LC 96
- Order-agnostic Binary Search (easy): new (Approach 1 in link) Ceiling of a Number (medium): new (link)
- Next Letter (medium): LC 744
- Number Range (medium): LC 34
- Search in a Sorted Infinite Array (medium): LC 702 Minimum Difference Element (medium): LC 658 (k == 1) Bitonic Array Maximum (easy): new (link)
- Problem Challenge 1: new (link)
- Problem Challenge 2: LC 33, LC 81
- Problem Challenge 3: LC 153, LC 154
- Single Number (easy): LC 136
- Two Single Numbers (medium): LC 260 Complement of Base 10 Number (medium): LC 476 Problem Challenge 1: LC 832
- Top 'K' Numbers (easy): new (link)
- Kth Smallest Number (easy): LC 215 (smallest instead of largest) 'K' Closest Points to the Origin (easy): LC 973
- Connect Ropes (easy): LC 1167
- Top 'K' Frequent Numbers (medium): LC 347
- Frequency Sort (medium): LC 451
- Kth Largest Number in a Stream (medium): LC 703
- 'K' Closest Numbers (medium): LC 658
- Maximum Distinct Elements (medium): new (link)
- Sum of Elements (medium): new (link)
- Rearrange String (hard): LC 767
- Problem Challenge 1: LC 358
- Problem Challenge 2: LC 621
- Problem Challenge 3: LC 895
- Merge K Sorted Lists (medium): LC 23
- Kth Smallest Number in M Sorted Lists (Medium): new (link)
- Kth Smallest Number in a Sorted Matrix (Hard): LC 378
- Smallest Number Range (Hard): LC 632
- Problem Challenge 1: LC 373 (largest sum instead of smallest sum)
- 0/1 Knapsack (medium): new (link)
- Equal Subset Sum Partition (medium): LC 416 Subset Sum (medium): new (link)
- Minimum Subset Sum Difference (hard): new (link) Problem Challenge 1: new (link)
- Problem Challenge 2: LC 494-
- Topological Sort (medium): new (link)
- Tasks Scheduling (medium): LC 207
- Tasks Scheduling Order (medium): LC 210
- All Tasks Scheduling Orders (hard): LC 210 (output all possible solutions) Alien Dictionary (hard): LC 269
- Problem Challenge 1: LC 444 Problem Challenge 2: LC 310
- Miscellaneous (1)
- Kth Smallest Number (hard): LC 215 (smallest instead of largest)
We will use the Clean code handbook to review 50 Problems.
For each problem you study, add YOUR own version of the code using markdown. You will use this as a study aid for years to come.
- Two Sum
function find_averages_of_subarrays(K, arr) {
const result = [];
for (let i = 0; i < arr.length - K + 1; i++) {
// find sum of next 'K' elements
sum = 0.0;
for (let j = i; j < i + K; j++) {
sum += arr[j];
}
result.push(sum / K); // calculate average
}
return result;
}
- Two Sum II
- Two Sum III
- Valid Palindrome
- Implement STRSTR()
- Reverse words in a string
- Reverse words in a string II
- String to Integer (ATOI)
- Valid Number
- Longest Substring without repeating Characters
- Longest Substring with at Most Two Distinct Characters
- Missing Ranges
- Longest Palindromic Substring
- One Edit Distance
- Read N Characters Given Read4
- Read N Characters Given read4 call multiple times
- Reverse Integer
- Plus One
- Palindrome Number
- Merge Two Sorted Lists
- Add Two Numbers
- Swap Nodes in Pairs
- Merge K Sorted Linked Lists
- Copy List with Random Pointer
- Valid Binary Search Tree
- Maximum Depth of a Binary Tree
- Minimum Depth of a Binary Tree
- Balanced Binary Tree
- Convert Sorted Array to Balanced Binary Search Tree
- Convert Sorted List to Balanced Binary Search Tree
- Binary Tree Maximum Path Sum
- Binary Tree Upside Down
- Single Number
- Single Number II
- Spiral Matrix
- Integer to Roman
- Roman to Integer
- Clone Graph
- Climbing Stairs
- Unique Paths
- Unique Paths II
- Maximum Sum Subarray
- Maximum Products Subarray
- Coins in a Line
- Search Insert Position
- Find Minimum in Sorted rotated Array
- Find Minimum in rotated sorted Array II (with duplicates)