Stack and Queue Interview Patterns — 15+ Patterns Catalog
Comprehensive catalog of 15+ stack and queue interview patterns with when-to-use guide, Python templates, complexity analysis, and problem mapping for coding interviews.
8 posts · page 1 of 1
Comprehensive catalog of 15+ stack and queue interview patterns with when-to-use guide, Python templates, complexity analysis, and problem mapping for coding interviews.
Master every knapsack variant — 0/1 knapsack, unbounded knapsack, fractional knapsack, subset sum, partition equal subset, and target sum with Python solutions and Big-O analysis.
Master longest subsequence problems — LIS with patience sorting, longest bitonic, chain of pairs, zigzag subsequence, Russian doll envelopes (2D LIS).
Master DP on grids — unique paths, minimum path sum, dungeon game, cherry pickup, and maximum path in grid with step-by-step Python solutions.
Master palindrome DP problems — longest palindromic subsequence, minimum cuts for palindrome partitioning, counting palindromic substrings, and shortest palindrome with KMP.
Complete guide to all stock trading problems — I through IV, with cooldown, and with transaction fee. One unified state machine DP framework covers them all.
Master the monotonic stack pattern — next greater/smaller element, largest rectangle in histogram, maximal rectangle, trapping rain water, stock span, daily temperatures.
A senior-engineer checklist for system design interviews: how to drive the discussion, allocate time, surface trade-offs, and avoid common traps.