House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
0/1 Knapsack
Implement the classic 0/1 Knapsack dynamic programming solution to maximize value under a weight capacity.
Unbounded Knapsack
Given item weights and values with unlimited copies, find the maximum total value that fits in a knapsack capacity.
Perfect Squares Sum
Given a positive integer n, return the least number of perfect squares (e.g., 1, 4, 9, 16, ...) that sum to n.
Palindrome Partitioning Minimum Cuts
Given a string, return the minimum number of cuts needed such that every substring in the partition is a palindrome.
Egg Drop Puzzle
Given k eggs and n floors, compute the minimum number of attempts required in the worst case to find the highest safe floor.
Paint House Colors
Given a cost matrix, compute the minimum total cost to paint all houses with no two adjacent houses having the same color.
Showing 7 challenges · Dynamic Programming
Dynamic Programming — Python coding challenges
What you will find here
This page lists dynamic programming challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.