Custom Sort String
Given a string s and an order string, reorder s so that characters that appear in order come first in that order, and all other characters are appended in stable original order.
Count Smaller Numbers
Given an integer list, return for each position how many later elements are smaller than it.
Group anagrams
Group words that are anagrams of each other.
Design Twitter Feed
Implement a Twitter class with postTweet, getNewsFeed, follow, and unfollow methods.
Quicksort
Implement quicksort and return a sorted list.
Count inversions lite
Implement a function that counts inversions in a list of numbers efficiently.
Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
Heap Sort Implementation
Implement the heap sort algorithm to sort a list of comparable elements in non-decreasing order.
Radix Sort
Implement LSD radix sort to sort a list of non-negative integers in ascending order.
Bucket Sort
Implement bucket sort to sort a list of floating-point numbers in the range [0,1).
Reconstruct Itinerary
Given a list of airline tickets, reconstruct the itinerary in order using each ticket exactly once, choosing the lexicographically smallest path when multiple options exist.
K Closest Elements
Implement a function to return the k closest elements to a target in a sorted array.
Merge time intervals
Given a list of time intervals, merge all overlapping intervals and return the merged intervals.
Top N per group
Implement top_n_per_group that returns the top N scores for each group from a list of (group, score) pairs.
Accounts Merge
Given a list of accounts, merge those that share any email and return sorted accounts.
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.
Meeting Rooms Minimum
Given a list of meeting time intervals, compute the minimum number of conference rooms required.
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.
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.
Showing 1–24 of 35 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.