Smith Number Check
Write a function to check if a number is a Smith number by comparing digit sums of the number and its prime factorization.
Partition function
Write a function that returns the number of ways to write a positive integer as a sum of positive integers (order irrelevant).
Deficient Number Check
Write is_deficient(n) that returns True if the sum of proper divisors is less than n.
Subset XOR sum
Given a list of integers, compute the bitwise XOR of each non-empty subset and return the sum of those XOR totals.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
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.
Coin Change Ways
Count the number of distinct combinations of coins that sum to a target amount.
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.
Integer Break Product
Given a positive integer n, break it into at least two positive integers that sum to n and maximize their product.
Minimum Falling Path Sum
Compute the minimum falling path sum in an n x n matrix by moving down or diagonally each step.
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.
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.
Sum Root to Leaf Numbers
Given the root of a binary tree, compute the total sum of all root-to-leaf numbers.
Range Sum BST
Return the sum of all node values in a BST that lie within a given inclusive range [low, high].
Partition to k subsets
Determine if an array of positive integers can be partitioned into k subsets of equal sum using backtracking.
Partition Equal Subset Sum (Backtracking)
Write a function that uses backtracking to decide if a list of positive integers can be partitioned into two subsets with equal sum.
Combination Sum
Given a list of distinct positive integers and a target, return all unique combinations that sum to the target.
Patching Array
Given a sorted array of positive integers and a target n, find the minimum number of patches to make every number from 1 to n representable as a subset sum.
Binary Search on Answer: Find the Minimal Maximum Subarray Sum
Implement a function that finds the minimal possible maximum subarray sum when splitting an array into at most k contiguous subarrays.
Showing 25–48 of 67 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.