Stock Trading Dynamic Programming Interview Patterns
7 min read Stock trading dynamic programming problems are a classic interview cluster. Every variant – one transaction, unlimited, at most k, cooldown, […] Read article
// dynamic-programming
Dynamic Programming (DP) is one of the most challenging yet rewarding topics in technical interviews.
7 min read Stock trading dynamic programming problems are a classic interview cluster. Every variant – one transaction, unlimited, at most k, cooldown, […] Read article
9 min read What is Interval DP? Interval DP is a dynamic programming pattern where you optimize over all sub-intervals of a range. Read article
10 min read 2D DP Pattern Overview 2D dynamic programming problems use a 2D table where dp[i][j] represents the optimal value considering only Read article
9 min read Dynamic Programming on Strings Interview Patterns String DP problems share a common structure: a 2D table where one dimension indexes Read article
3 min read The 0/1 Knapsack problem is one of the most important DP patterns. Unlike coin change (unbounded knapsack), each item can Read article
3 min read Longest Common Subsequence (LCS) is a fundamental string DP problem that appears in interviews at Google, Microsoft, and Amazon — Read article
3 min read Edit Distance (Levenshtein Distance) is a classic string DP problem that appears in interviews at Google, Microsoft, and Dropbox. It’s Read article
2 min read Word Break (LeetCode 139) is a string DP problem that tests whether you can partition a string using a given Read article
2 min read Coin Change (LeetCode 322) is the canonical dynamic programming problem. It tests your ability to identify optimal substructure, choose between Read article
2 min read Write a function to find the longest palindrome in a string. 2026 Update: Longest Palindrome — Character Frequency Approach There Read article
6 min read Prime Numbers: Sieve of Eratosthenes, Trial Division, and the Miller-Rabin Test Prime number problems appear at FAANG interviews, fintech screens, Read article
5 min read The Fruit Jar Labeling Puzzle: Three Mislabeled Jars, One Fruit Picked The fruit jar labeling puzzle is a famous lateral-thinking Read article
7 min read Longest Palindromic Substring: Expand Around Center, DP, and Manacher’s Algorithm Finding the longest palindromic substring of a string is one Read article
4 min read Question: You have two identical eggs. Standing in front of a 100 floor building, you wonder what is the maximum Read article
4 min read Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the Read article
What's missing, wrong, or worth adding? One line helps.
Sent — thank you. We read every one.