Partition Equal Subset
Determine whether a given list of positive integers can be partitioned into two subsets with equal sum.
Target Sum Subsets
Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.
Integer Break Product
Given a positive integer n, break it into at least two positive integers that sum to n and maximize their product.
Longest Arithmetic Subsequence
Given a list of integers, return the length of the longest arithmetic subsequence (constant difference) within it.
Shortest Unsorted Continuous Subarray
Given an array of integers, return the length of the shortest contiguous subarray whose sorting makes the whole array sorted.
Count subsets with sum
Given a list of integers and a target sum, count how many subsets of the list sum to the target.
Target sum assignments
Given a list of integers and a target, count how many ways to assign + or - to each number so the total equals the target.
Subset Sum Exists
Given a list of positive integers and a target sum, return whether some subset adds up exactly to the target.
Delete and Earn
Given an array of integers, find the maximum points you can earn by repeatedly deleting a number and all its adjacent values.
Showing 1–9 of 9 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.