Merge intervals
Merge all overlapping intervals and return a sorted result.
Quicksort
Implement quicksort and return a sorted list.
Longest Consecutive Sequence
Given an unsorted list of integers, find the length of the longest consecutive elements sequence in O(n) time.
Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
K Closest Elements
Implement a function to return the k closest elements to a target in a sorted array.
Alien Dictionary Order
Given a sorted list of words in an alien language, derive the order of its unique letters.
Search in Rotated Array
Implement an efficient search in a rotated sorted array using modified binary search.
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.
Single Element in Sorted Array
Given a sorted array where every element appears exactly twice except one which appears once, return the single element.
Rotated Array Search II
Implement a function to search for a target in a rotated sorted array with possible duplicates.
Interval List Intersections
Given two lists of sorted, disjoint intervals, return the list of intersections between them.
Buildings with ocean view
Given building heights, return sorted indices of buildings that have a clear view of the ocean to their right.
Kth Largest Element in an Array (Heap Edition)
Implement a function that returns the kth largest element in an unsorted integer array using a heap.
Find K pairs with smallest sums
Given two sorted arrays and an integer k, return the k smallest pairs (u, v) with the smallest sums, sorted by sum.
Showing 15 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.