Jump Game Minimum Jumps
Given an array of non-negative integers where each element is the maximum jump length, compute the minimum jumps to reach the last index.
Maximum subarray (Kadane)
Find the contiguous subarray with the largest sum.
Partition Array
Implement a function that finds a contiguous partition of a list into k groups, minimizing the maximum sum of the groups.
Online Stock Span
Implement StockSpanner.next(price) that returns the maximum number of consecutive days (including today) with price <= current price.
Rate Limit Decorator
Implement a decorator that enforces a maximum number of calls per second for any function.
Maximum XOR Pair
Implement max_xor_pair(nums) that returns the maximum XOR value obtainable by pairing any two numbers in the given list.
Kadane Variant: Maximum Product Subarray
Implement max_product_subarray(nums) that returns the maximum product of any contiguous subarray.
Max Profit from Selling Twice
Compute the maximum profit that can be achieved by completing at most two buy-sell transactions on a given price array.
House Robber Circular
Solve the House Robber problem with houses arranged in a circle.
Maximal square
Given a 2D binary matrix of 0s and 1s, compute the area of the largest square containing only 1s.
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.
Integer Break Product
Given a positive integer n, break it into at least two positive integers that sum to n and maximize their product.
Buy Sell Stock with Cooldown (DP)
Given daily stock prices, compute the maximum profit you can achieve if you must wait one day after selling before buying again.
Maximal square matrix
Given a 2D binary matrix of 0s and 1s, find the side length of the largest square containing only 1s.
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.
Maximal rectangle in matrix
Given a matrix of 0s and 1s, compute the area of the largest rectangle consisting only of 1s.
Maximum Width of a Binary Tree
Given the root of a binary tree, compute its maximum width (the maximum number of nodes in any level, counting null positions).
Most stones removed
Given stone coordinates on a grid, find the maximum number of stones that can be removed while every stone shares a row or column with another remaining stone.
Partition Labels
Partition a string into maximal parts where each character appears in only one part, returning part lengths.
Bag of Tokens Score
Given tokens with values and initial power, determine the maximum score achievable by selling tokens for power or buying tokens for score.
Painter Partition Problem
Given board lengths and k painters, find the minimum possible maximum total length a painter must paint.
IPO Maximize Capital
Given project profits and capital requirements, choose at most k projects to maximize final capital.
Job Sequencing with Deadlines and Profits
Given jobs with deadlines and profits, choose a subset that maximizes profit while meeting deadline constraints.
Showing 1–24 of 36 challenges · medium
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.