Max of a variable-length list
Implement a function that returns the maximum value from a list of numbers without using max().
Max of three numbers
Implement a function that returns the maximum of three numbers using comparisons.
Argmax along axis
Write a function that returns index positions of the maximum values along rows or columns of a 2D list.
Running Maximum
Implement a function that returns a list where each element is the largest value seen so far.
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.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
Maximum depth of tree
Implement max_depth(root) to return the maximum depth of a binary tree.
Stock Buy Sell Once
Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.
Assign Cookies
Given child greed factors and cookie sizes, return the maximum number of content children.
Maximum Ice Cream Bars
Given costs of ice cream bars and coins, return the maximum number you can buy.
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.
Container With Most Water
Compute the maximum area between two vertical lines in an array of heights.
Maximum node value
Return the largest integer or None when empty.
Maximum element in vector
Return largest value or None when empty.
Showing 1–14 of 14 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.