Dynamic Programming Visualizers

22

Step through every Dynamic Programming problem with animated runtime state, source highlighting, and curated test cases. Built for coding-interview prep and durable algorithmic intuition.

Burst Balloons
Consider strings bursting last within sub-windows length combinations to evaluate maximum nested rewards.
2D DP (Interval Windows)
Climbing Stairs
Count the ways to reach the top by summing the ways to reach the 1-step and 2-step previous stairs.
1D DP (Fibonacci-like)
Coin Change
Find the absolute minimum coins needed for any amount by comparing combinations of all available coin denominations.
1D DP (Coin Combinations)
Coin Change II
Calculate unique coin combinations sequentially over the amount target to prevent double-counting combinations as permutations.
Unbounded Knapsack
Decode Ways
Calculate parsing possibilities by evaluating if single characters or double characters map to letters A-Z.
1D DP (Combinatorics)
Edit Distance
Find minimum insert/delete/replace operations dynamically comparing text alignments across a matrix.
2D DP (Matrix Distance)
Fibonacci Number
Calculate the nth Fibonacci number strictly computing bottom-up to save recursion overhead.
1D DP (Bottom-Up)
House Robber
Maximize loot by choosing between robbing the current house + the house two doors down, or skipping it entirely.
1D DP (Adjacent Skip)
House Robber II
Solve the house robber problem twice (once skipping the first house, once skipping the last) to account for the circular street.
1D DP (Circular Arrays)
Longest Common Subsequence
Compute intersecting string characters via 2D matrices, pulling diagonals for matches and edges for non-matches.
2D DP (String alignment)
Longest Increasing Subsequence
Linearly search prior numbers validating smaller ones to extend sequences, logging max lengths per index.
1D DP (Double Loop)
Longest Palindromic Substring
Expand from all possible centers to discover the longest valid palindrome within the string memory bounds.
Expand Around Center
Maximum Product Subarray
Track the running max AND min products to account for the property where multiplying two negative numbers creates a positive.
Kadane's Algorithm variant
Maximum Subarray
Apply Kadane's algorithm to compute the largest contiguous sum by abandoning negative prefix sums.
Kadane's Algorithm
Min Cost Climbing Stairs
Minimize the cost to reach the top by choosing the cheapest path from the two preceding steps.
1D DP (Path Cost)
Min Cost to Cut a Stick
Find the minimum cost to cut a stick at given points using interval DP.
Dynamic Programming (Interval)
Palindromic Substrings
Expand outwards from every single character and between every character to count all palindromes efficiently.
Expand Around Center
Partition Equal Subset Sum
Ensure the total sum is even, then iterate combinations to see if a subset strictly equals sum/2.
0/1 Knapsack
Regular Expression Matching
Enforce pattern combinations over wildcard/star lookbacks inside a 2D matrix matching rules.
2D DP (Regex rules)
Super Egg Drop
Find minimum moves to determine critical floor using k eggs.
Dynamic Programming (Math)
Unique Paths
Map combinations by simulating paths from Top and paths from Left, optimized into O(M) space.
2D DP (Grid Traversal)
Word Break
Check if segments of the string can be matched against an exact hash set dictionary iteratively.
1D DP (Substring Parsing)