Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Coding Interview Class
The Application To The Offer
Getting Referrals (6:08)
Effective Recruiter Communication (5:52)
Time & Space Complexities
Introducing Asymptotic Measures (5:16)
Asymptotic Bounding 101
O(1) Time (“Constant Time”) (4:55)
O(log(n)) (“Logarithmic Time”) (16:04)
O(n) (“Linear Time”) (13:54)
O(n * log(n)) (15:19)
O(n!) ("Factorial Time") (11:06)
O(|V| + |E|) (21:21)
Approximating Time Complexities of Recursive Functions (25:24)
Useful Recurrence Generalizations (15:15)
The Master Theorem (8:53)
Memoization (9:36)
Primitives
Check If A Number Is A Palindrome (10:30)
Changing Base (13:13)
Arrays
Rotating a 2D Matrix (16:03)
Spiral Traversal of A Matrix (12:18)
The 3-Sum Problem (12:43)
Next Permutation
Strings
Longest Palindrome Construction (12:07)
Pattern Matching (12:24)
Linked Lists
Fundamentals: Linked Lists (16:47)
Design A Linked List (9:05)
Even Odd Partition (11:25)
Swap Linked List Nodes In Pairs (20:03)
Sublist Reversal (12:39)
Testing For Cycles (11:26)
Testing For Overlapping Lists (No Cycles) (6:54)
Remove kth Last Element (9:12)
Right Shift A Singly Linked List (11:58)
Add 2 Integers Represented As Linked Lists (13:38)
Flatten A Multilevel Doubly Linked List (10:13)
Clone A Linked List (With Random Pointers)
Stacks & Queues
The Balanced Parentheses Problem (20:00)
Compute Buildings With A Sunset View (11:46)
Implement A Circular Queue (7:41)
Implement A Queue With A Max API (13:35)
Implement Text Editor Undo/Redo (11:41)
Implement A Queue Using Stacks
Trees
Longest Node To Node Path In A Binary Tree (16:33)
Test If A Binary Tree Is Symmetric (11:51)
Sum Root To Leaf Paths (16:13)
Compute A Node's Inorder Successor (17:39)
Tree Reconstruction (20:22)
Test A Tree For The BST Property (13:54)
Build A Min-Height BST From A Sorted Array (6:54)
Insertion & Deletion In A BST (13:52)
Populating Level Pointers (19:19)
Inorder Traversal Without Recursion (12:38)
Binary Tree Bootcamp
Test If A Binary Tree Is Height Balanced
Serialize & Deserialize A Binary Tree
Special Trees
Implement A Trie (10:57)
Heaps
Fundamentals: Heaps (13:42)
Merge K Sorted Arrays (16:35)
K Largest/Smallest Elements In An Array (8:09)
Compute The Median of Online Data (13:45)
K Largest Elements In An Immutable Max-Heap (8:31)
Implement A Binary Heap
Searching
Intersection of 2 Sorted Arrays (11:34)
Minimum Item In A Rotated Sorted Array (10:26)
Search A 2D Sorted Matrix
Find the k'th Largest or Smallest Element
Hashtables
Fundamentals: Hashtables (14:37)
Implement An LRU Cache (16:43)
Nearest Repeated Entries In An Array (7:55)
Minimum Window Substring
Sorting
Naive Sorting Algorithms & Applications (Bubble, Insertion, Selection) (15:26)
Merge Sort
Heapsort
Quicksort
The Most Visited Pages Problem (20:02)
Sort A K Sorted Array
Recursion
Divide & Conquer Methodology (9:07)
Implement A Sudoku Solver (19:03)
Search A Linked List With Jump References (19:40)
Phone Number Mnemonics (13:11)
IP Address Restoration (13:19)
The N Queens Problem (18:17)
Permutations (7:05)
Generate The Powerset (10:11)
Generate All Subsets of Size K (11:30)
Palindromic Decompositions (7:07)
The Backtracking Blueprint
Generate All Strings With n Matched Parentheses
Dynamic Programming
Fundamentals: Dynamic Programming (23:37)
Score Combinations (Total Ways To Make Change) (24:09)
Buy & Sell Stock Once (13:48)
Number of Ways To Traverse A Matrix (10:31)
Minimum Weight Path In A Triangle (6:35)
Decode Ways (16:00)
Levenshtein Distance (15:57)
Longest Non-Decreasing Subsequence (16:31)
The 0/1 Knapsack Problem (20:24)
DNA Sequence Alignment (22:51)
1D Subproblems vs. 2D Subproblems (11:26)
The Change Making Problem
Max Contiguous Subarray Sum
Longest Common Subsequence
Greedy Algorithms
Fundamentals: Greedy Algorithms (5:46)
Minimum Spanning Trees (11:50)
Erase Interval Overlaps (10:40)
Interval Scheduling Maximization
Dijkstra's vs Prim's
Graphs
Fundamentals: Graphs (19:45)
Depth First Search & Breadth First Search (21:26)
Keys & Rooms (14:34)
Search A Maze For An Exit (10:28)
Paint A Matrix (15:59)
Compute Enclosed Regions (13:18)
Detect A Cycle In A Graph (Deadlock Detection) (20:16)
String Transformations (17:28)
Topological Sorting On A Digraph (13:08)
Check If A Graph Is Bipartite (15:27)
Clone A Graph (11:43)
Testing Strong Connectivity (20:37)
All Nodes Distance K In A Binary Tree
Binary Tree Level Order Traversal
Screening Questions
Directory Access (Dropbox) (13:59)
Search A 2D Sorted Matrix
Table of Contents:
The Problem Introduction (Variant 1)
0:00
-
1:51
Jumping To The Brute Force
1:51
-
2:52
Optimizing Our Search
2:52
-
4:14
We Need To Notice Something...
4:14
-
5:49
The Data Does Not Dictate How We Interpret It
5:49
-
7:28
Establishing Our Mapping System
7:28
-
11:03
Executing The Binary Search
11:03
-
15:10
Runtime of Our Binary Search
15:10
-
15:45
The Problem Introduction (Variant 2)
15:45
-
16:43
Jumping To The Brute Force
16:43
-
17:15
The #1 Key To Search Problems
17:15
-
19:08
Defining Our Fundamental Decision Operation
19:08
-
20:57
Searching For Places To Start Our Search
20:57
-
22:48
Search Example #1 (Bottom Left Starting Point)
22:48
-
24:37
Search Example #2 (Top Right Starting Point)
24:37
-
25:38
What Just Happened
25:38
-
26:19
Analyzing Our Incremental Approach
26:19
-
28:34
Wrap Up
28:34
-
29:11
Code:
https://github.com/bephrem1/backtobackswe/blob/master/Sorting%2C%20Searching%2C%20%26%20Heaps/SearchA2DMatrix/SearchA2DMatrix.java
Elements of Programming Interviews:
12.6
Version 1 On Leetcode:
https://leetcode.com/problems/search-a-2d-matrix
Version 2 On Leetcode:
https://leetcode.com/problems/search-a-2d-matrix-ii
Version 1 On GeeksForGeeks:
https://www.geeksforgeeks.org/search-element-sorted-matrix
Version 2 On GeeksForGeeks:
https://www.geeksforgeeks.org/search-in-row-wise-and-column-wise-sorted-matrix
Complete and Continue
Discussion
3
comments
Load more
Lesson Content Locked
Your session expired. Please sign in again to continue.
Login
3 comments