Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

875 challenges 536 easy 303 medium 36 hard
Dynamic Programming medium

Bell number

Implement a function to compute the Bell number B(n) using dynamic programming.

dp combinatorics math
+25 pts 25m
Dynamic Programming medium

Edit Distance (Levenshtein Distance)

Implement the classic edit distance algorithm to find the minimum number of single-character edits required to transform one string into another.

dynamic-programming strings levenshtein-distance
+25 pts 30m
Dynamic Programming medium

Target Sum Subsets

Write a function that counts the number of subsets of a list of positive integers that sum exactly to a target.

subset-sum dp counting
+25 pts 30m
Dynamic Programming medium

Coin Change Minimum

Given coin denominations and a target amount, compute the minimum number of coins needed or -1 if impossible.

dynamic-programming coins minimum
+30 pts 25m
Dynamic Programming medium

Coin Change Ways

Count the number of distinct combinations of coins that sum to a target amount.

dynamic programming coins counting
+30 pts 25m
Dynamic Programming medium

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.

dynamic-programming math optimization
+25 pts 25m
Dynamic Programming medium

Ugly Number II

Given an integer n, return the nth ugly number using an efficient dynamic programming approach.

dynamic programming math pointers
+25 pts 25m
Dynamic Programming medium

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.

dynamic programming combinatorics arrays
+30 pts 25m
Dynamic Programming medium

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.

dynamic-programming array hash-map
+30 pts 25m

Showing 9 challenges · medium · 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.