Shortest Unsorted Continuous Subarray
Given an array of integers, return the length of the shortest contiguous subarray whose sorting makes the whole array sorted.
Vertical Order Traversal
Compute the vertical order traversal of a binary tree, grouping nodes by column and row.
Permutations II
Return all distinct permutations of a list of integers that may include duplicates.
Combination Sum
Given a list of distinct positive integers and a target, return all unique combinations that sum to the target.
Assign Cookies
Given child greed factors and cookie sizes, return the maximum number of content children.
Meeting Rooms Minimum
Given a list of meeting time intervals, compute the minimum number of conference rooms required.
Maximize units on truck
Given box types with count and units per box, maximize total units loaded onto a truck.
Boats to Save People
Given a list of people weights and a boat's weight limit, return the minimum number of boats required.
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.
Maximum Ice Cream Bars
Given costs of ice cream bars and coins, return the maximum number you can buy.
Minimum Number of Arrows to Burst Balloons
Given balloon intervals, find the minimum number of arrows to burst all balloons by merging overlaps.
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.
Queue Reconstruction by Height
Given shuffled pairs of (height, number_of_taller_people_in_front), reconstruct the original queue order.
Non-overlapping Intervals
Given a list of intervals, return the minimum number of intervals to remove to make the rest non-overlapping.
Max events attended
Given a list of events with start and end times, find the maximum number of non-overlapping events you can attend.
Find k Closest Elements to Target
Return exactly k elements from a sorted list that are closest to a given target, preserving order.
Sort Colors (Dutch National Flag)
Implement the Dutch National Flag algorithm to sort an array of 0, 1, 2 in one pass.
Reverse Pairs Count
Implement a function to count reverse pairs in an array efficiently.
Three Sum
Given an array of integers, return all unique triplets that sum to zero.
Closest Three Sum
Given an array of integers and a target, return the sum of three numbers that is closest to the target.
Squares of Sorted Array
Implement a function that returns a sorted list of squares for a given non-decreasing integer array.
Boats to Save People – Two Pointer
Implement a function that returns the minimum number of boats needed to rescue everyone, given a weight limit and each boat carrying at most two people.
Sliding Window Median
Given a list of integers and a positive window size k, return the median of each sliding window of length k.
Showing 49–72 of 73 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.