Combination Sum
Given a list of distinct positive integers and a target, return all unique combinations that sum to the target.
Jump Game Reachable
Given an array of non-negative integers where each element is the maximum jump length, determine if you can reach the last index.
Interpolation Search
Implement interpolation search in Python on a sorted list of integers.
Find Minimum in Rotated Sorted Array
Implement a function that finds the minimum element in a rotated sorted array of distinct integers in O(log n) time.
Nth Magical Number
Given three integers n, a, b, return the nth positive integer that is divisible by either a or b.
Count Nice Subarrays
Given an array of integers, count the number of contiguous subarrays that contain exactly k odd numbers.
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.
Minimum Size Subarray Sum
Given an array of positive integers, return the minimal length of a contiguous subarray with sum at least target, or 0 if none exists.
Fruit into Baskets
Given an array of integers representing fruit types, return the maximum number of fruits you can collect in a contiguous subarray with at most two distinct types.
Trapping Rain Water (Two Pointers)
Given an array of non-negative integers representing elevation heights, compute how much water can be trapped after rain.
Sliding Window Median
Given a list of integers and a positive window size k, return the median of each sliding window of length k.
Validate Stack Sequences
Given two sequences of distinct integers, verify whether the second sequence is a valid pop order for a stack given the first sequence as push order.
Top K Frequent Elements
Given a list of integers and a number k, return the k most frequent elements in descending order of frequency, with ties broken by larger value.
Sliding Window Maximum using Heap
Given an array of integers and a window size k, return an array of maximums for each contiguous subarray of length k.
Showing 25–39 of 39 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.