Min of three numbers
Write a function that returns the minimum of three integers.
Find Minimum Value
Write a function that returns the minimum integer from a given list.
Longest Harmonious Subsequence
Given a list of integers, find the length of the longest harmonious subsequence where the difference between maximum and minimum values is exactly 1.
Min cost climbing stairs
Compute the minimum total cost to reach the top of a staircase, given you can climb 1 or 2 steps at a time.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
Minimum Depth of Tree
Given a binary tree, compute the minimum depth from the root to the nearest leaf node.
Best Time to Buy and Sell Stock
Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.
Reduce array to zero
Given an array of non-negative integers, each operation chooses two indices and subtracts 1 from each if both are positive. Return the minimum number of operations to reduce the array to all zeros, or -1 if impossible.
Showing 8 challenges · easy
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.