📐
Dynamic Programming
Sequences, grids, knapsack, string DP, state machines.
01
1D & climbing
0/16 of 25Stairs, robber, tribonacci, min cost.
○Fibonacci NumberSilver · 1000○Climbing StairsSilver · 1050○Tribonacci NumberSilver · 1050○N-th Tribonacci NumberSilver · 1050○Minimum Cost Climbing StairsSilver · 1100○Paint House Minimum CostSilver · 1100○House RobberSilver · 1150○Paint FenceSilver · 1150○Max Non-Adjacent SumSilver · 1150○Climbing Stairs (K Steps)Silver · 1150○Min Cost Climbing StairsSilver · 1200○Paint Fence WaysGold · 1300○Minimum Cost to Paint HousesGold · 1300○Paint HouseGold · 1350○House Robber II (Circular)Gold · 1380○Paint House IIGold · 1400+ 9 more in the arena →
02
Sequences (LIS)
0/10Longest increasing, arithmetic, pair chains.
○Longest Arithmetic Subsequence of Given DifferenceSilver · 1180○Longest String Chain LengthSilver · 1190○Maximum Sum Increasing SubsequenceGold · 1350○Longest String ChainGold · 1450○Longest Increasing SubsequenceGold · 1500○Longest Arithmetic SubsequenceGold · 1500○Russian Doll EnvelopesGold · 1500○Number of Longest Increasing SubsequencesGold · 1550○Longest Bitonic SubsequencePlatinum · 1700○Count Arithmetic SubsequencesPlatinum · 1850
03
Grid paths
0/16 of 21Unique paths, min path sum, falling path.
○Unique PathsSilver · 1050○Minimum Path SumSilver · 1150○Triangle Minimum TotalSilver · 1150○Unique Paths IISilver · 1150○Unique Paths in a GridSilver · 1180○Triangle Minimum Path SumSilver · 1200○Minimum Falling Path SumGold · 1300○Minimum Total Path In TriangleGold · 1300○Triangle Minimum PathGold · 1300○Unique Paths With ObstaclesGold · 1350○TriangleGold · 1350○Maximal SquareGold · 1450○Minimum Falling Path Sum IIGold · 1450○Dungeon Game Minimum HealthGold · 1500○Dungeon GameGold · 1500○Count Square SubmatricesGold · 1500+ 5 more in the arena →
04
Knapsack & subset
0/16 of 31Partition, target sum, coin change.
○Perfect SquaresSilver · 1100○Number of Dice Rolls With Target SumSilver · 1150○Coin Change: Number of WaysSilver · 1200○Coin ChangeSilver · 1200○Coin Change Minimum CoinsGold · 1300○Maximum Alternating Subsequence SumGold · 1350○Equal Subset PartitionGold · 1350○Rod Cutting Max RevenueGold · 1350○Dice Rolls With Target SumGold · 1400○0/1 Knapsack Max ValueGold · 1400○Coin Change IIGold · 1400○Coin Change (Min Coins)Gold · 1450○Partition Equal Subset SumGold · 1450○Coin Change MinimumGold · 1450○Coin Change WaysGold · 1450○Target SumGold · 1450+ 15 more in the arena →
05
String DP
0/16 of 18LCS, edit distance, palindromic subseq.
○Maximum Length of Repeated SubarrayGold · 1350○Longest Palindromic SubsequenceGold · 1450○Minimum Insertions to Make PalindromeGold · 1450○Longest Palindromic Substring LengthGold · 1450○Insertions to PalindromeGold · 1450○Max Repeated SubarrayGold · 1450○Word Break (Count Ways)Gold · 1450○Minimum Insertions to Make a PalindromeGold · 1480○Longest Common SubsequenceGold · 1500○Word BreakGold · 1500○Distinct Subsequences CountGold · 1500○Edit DistancePlatinum · 1700○Count Palindromic SubsequencesPlatinum · 1800○Distinct Subsequences (mod 1e9+7)Platinum · 1800○Wildcard MatchingPlatinum · 1850○Count Distinct Palindromic SubsequencesDiamond · 1900+ 2 more in the arena →
06
Stock & intervals
0/16 of 24Buy/sell, cooldown, job scheduling.
○Predict the Winner Score DifferenceGold · 1350○Best Time to Buy and Sell Stock with FeeGold · 1350○Stock Trading with FeeGold · 1400○Best Time to Buy and Sell With Transaction FeeGold · 1400○Stock Trading with CooldownGold · 1450○Best Time to Buy and Sell With CooldownGold · 1450○Predict The Winner (Score Difference)Gold · 1450○Maximum Profit in Job SchedulingGold · 1480○Best Time to Buy and Sell Stock (Two Transactions)Gold · 1500○Predict the Winner DifferenceGold · 1500○Minimum Difficulty of a Job ScheduleGold · 1510○Filling Bookcase ShelvesGold · 1550○Best Time to Buy and Sell With At Most Two TransactionsGold · 1550○Stone Game VIIGold · 1550○Best Time to Buy and Sell Stock with CooldownGold · 1550○Stone GamePlatinum · 1700+ 8 more in the arena →