LeetCode Interval Problems: Merge, Insert, and Schedule
Master interval problems on LeetCode: sorting, merging, inserting, and scheduling with templates, visual walkthroughs, and complexity analysis.
13 posts · page 1 of 1
Master interval problems on LeetCode: sorting, merging, inserting, and scheduling with templates, visual walkthroughs, and complexity analysis.
Master every two pointer pattern for LeetCode: opposite-end, same-direction, and fast/slow pointers with templates, complexity analysis, and 15+ mapped problems.
Explore randomized algorithms -- QuickSelect for O(n) kth element, reservoir sampling for streams, randomized quicksort, skip lists, bloom filters, and Monte Carlo vs Las Vegas classification.
Master backtracking with reusable templates for permutations, combinations, subsets, and constraint satisfaction problems on LeetCode.
Master binary search patterns for LeetCode including search space reduction, boundary finding, rotated array search, and practical templates.
Master dynamic programming with 1D and 2D patterns, memoization vs tabulation approaches, and solutions to classic LeetCode DP problems.
Master graph traversal patterns for LeetCode including BFS, DFS, topological sort, Dijkstra, and practical templates with solutions.
Master greedy algorithm patterns for LeetCode including interval scheduling, activity selection, jump games, and proving greedy correctness.
Master the sliding window technique with fixed and variable window patterns, two pointer variants, and reusable templates for solving LeetCode problems.
Master every tree traversal method with recursive, iterative, and Morris traversal implementations, plus classic LeetCode tree problems.
Master stack and queue patterns for LeetCode including monotonic stacks, min stacks, queue implementations, and practical templates.
Understand how the k-nearest neighbors algorithm classifies and regresses by looking at similar examples, when it works well, and how to tune k and distance metrics for real problems.
A practical tour of substring search — the naive O(n·m) scan, the KMP algorithm with its LPS array, and the Rabin-Karp rolling hash. Worked examples, code, and intuition for when to use each.