Bitwise AND of a Range
Given a range [a, b], return the bitwise AND of all integers in that inclusive range without iterating over all numbers.
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.
Minimum Falling Path Sum
Compute the minimum falling path sum in an n x n matrix by moving down or diagonally each step.
Matrix Chain Multiplication
Given a list of matrix dimensions, compute the minimum multiplication cost using dynamic programming.
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.
Split Array Largest Sum
Minimize the largest sum among k contiguous subarrays using dynamic programming.
Minimum Path Sum Matrix
Implement a function that computes the minimum path sum from the top-left to the bottom-right of a grid moving only right or down.
Dungeon Game Minimum Health
Compute the minimum initial health needed to reach the bottom-right corner of a dungeon grid without health dropping to zero or below.
Partition to k subsets
Determine if an array of positive integers can be partitioned into k subsets of equal sum using backtracking.
Candy Distribution
Compute the minimum total candies needed so that every child gets at least one and children with higher ratings than neighbors get more candies.
Remove K Digits to Form the Smallest Number
Given a non-negative integer as a string, remove exactly k digits to form the smallest possible integer without leading zeros.
Max events attended
Given a list of events with start and end times, find the maximum number of non-overlapping events you can attend.
Minimum Limit of Balls in a Bag
Given an array of bag sizes and a number of allowed splits, find the minimum possible maximum bag size.
Minimum Cost to Connect Sticks
Compute the minimum total cost to connect all sticks into one stick by repeatedly combining two sticks with the smallest lengths.
Showing 1–20 of 20 challenges
Guide: free Python coding challenges
Practice Python by solving problems
PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.
How to use the arena
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- Run tests, fix failures, then try a related quiz or tutorial lesson
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.