Merge Sort
Implement merge_sort(numbers) that returns a sorted copy of the input list using the merge sort algorithm.
Exponential Search
Implement exponential search to find any valid index of a target in a sorted list.
K Closest Elements
Implement a function to return the k closest elements to a target in a sorted array.
Merge Two Sorted Lists
Write a function that merges two sorted lists into a single sorted list.
Jump Search
Implement the jump search algorithm to locate a target in a sorted list, returning its index or -1.
Merge K Sorted Lists
Write a function that merges multiple sorted lists into a single sorted list.
Delete duplicates sorted II
Given a sorted list, remove duplicates in place so each element appears at most twice, returning the new length.
Accounts Merge
Given a list of accounts, merge those that share any email and return sorted accounts.
Sieve of Eratosthenes
Implement the Sieve of Eratosthenes to return a sorted list of all primes up to a given integer n.
Prime Factorization
Return a sorted list of prime factors of a positive integer, including repeated factors.
Shortest Unsorted Continuous Subarray
Given an array of integers, return the length of the shortest contiguous subarray whose sorting makes the whole array sorted.
Alien Dictionary Order
Given a sorted list of words in an alien language, derive the order of its unique letters.
Patching Array
Given a sorted array of positive integers and a target n, find the minimum number of patches to make every number from 1 to n representable as a subset sum.
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.
Search Insert Position
Return the index where a target should be inserted into a sorted list to maintain order.
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.
Median of Sorted Array BS
Implement a binary search algorithm to find the median of two sorted arrays efficiently.
Single Element in Sorted Array
Given a sorted array where every element appears exactly twice except one which appears once, return the single element.
Upper Bound Binary Search
Write a function that returns the index of the first element greater than a target in a sorted list.
Find Indices of Target in Sorted List
Given a sorted list and a target, return the indices of its first and last occurrence, or [-1, -1] if absent.
Rotated Array Search II
Implement a function to search for a target in a rotated sorted array with possible duplicates.
Kth Smallest in Sorted Matrix
Implement kth_smallest(matrix, k) to return the kth smallest element in a row- and column-sorted square matrix.
Search 2D Matrix
Given a sorted 2D matrix with sorted rows and first element of each row greater than last of previous, find target efficiently.
Showing 25–48 of 60 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.