Find Missing Number
Given a list of n distinct integers from 0..n with one missing, return the missing number.
Remove duplicates (sorted)
Return a sorted list with duplicates removed.
Merge two sorted arrays
Merge two sorted arrays into one sorted array.
Second Largest Unique Value
Return the second largest distinct integer from a list, or None if it doesn't exist.
Find Missing Number 1 to n
Given a list containing n-1 distinct integers from 1 to n, find the missing number without using extra space.
Majority Element Finder
Implement a function that returns the majority element in a list, which appears more than half the time.
Rearrange Positives and Negatives
Write a function that rearranges a list in-place so all negative numbers come before non-negative numbers.
Wave sort array
Given a list of integers, reorder it into a wave pattern where elements alternate down-up, and return the new list.
Counting Sort
Implement the counting sort algorithm to sort a list of non-negative integers in O(n + k) time.
Index of peak element
Implement a function that returns the index of any peak element in a given integer array.
Count pairs with given difference
Count how many unordered pairs in a list have a given absolute difference using an efficient approach.
Previous Smaller Element
Find the nearest previous index with a smaller value for every element in an array.
Pascal Triangle Row
Given a non-negative integer n, return the nth row of Pascal's triangle as a list of integers.
Bubble Sort
Implement bubble sort that sorts a list of numbers in ascending order.
Exponential Search
Implement exponential search to find any valid index of a target in a sorted list.
Sieve of Eratosthenes
Implement the Sieve of Eratosthenes to return a sorted list of all primes up to a given integer n.
Single Number XOR
Given a non-empty list of integers where every element appears twice except one, return the single number using XOR.
Missing Number XOR
Given a list of n distinct numbers from 0 to n with one missing, use XOR to find and return the missing number.
Min cost climbing stairs
Compute the minimum total cost to reach the top of a staircase, given you can climb 1 or 2 steps at a time.
House Robber
Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.
Triangle Minimum Path
Compute the minimum path sum from top to bottom of a triangle given as a list of lists.
Find the Town Judge
Given n people and a trust array, return the town judge or -1.
Find center of star graph
Write a function that finds the center node of a star graph from its list of edges in O(1) time.
Stock Buy Sell Once
Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.
Best Time to Buy and Sell Stock
Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.
Next Greater Element
Return a list where each position holds the next greater element to the right, or -1 if none exists.
Showing 26 challenges · easy
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.