Find Missing Number
Given a list of n distinct integers from 0..n with one missing, return the missing number.
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.
Union of Two Lists
Implement a function that combines two lists and returns only unique elements.
Intersection two lists length
Return the number of distinct elements that appear in both input lists.
Set intersection size
Count how many distinct values appear in both of two given lists.
Count Pairs with Sum
Implement a function that counts the number of distinct pairs in a list summing to a target.
N-Queens Solutions
Implement a function to count the number of distinct ways to place n queens on an n×n board.
Stars and Bars Count
Implement stars_and_bars_count(n, k) which returns the number of ways to put n identical items into k distinct bins, with bins allowed to be empty.
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.
Climbing Stairs
Implement a function that returns the number of distinct ways to climb n stairs using steps of 1 or 2.
Coin Change Ways
Count the number of distinct combinations of coins that sum to a target amount.
Unique Paths in a Grid
Count distinct paths in an m x n grid moving only down or right.
Tiling dominoes count
Given a 2 x n board, count the distinct tilings using 2 x 1 dominoes.
Clique Detection
Given an undirected graph and a list of vertices, check if every pair of distinct vertices in the list is connected by an edge.
Permutation Generator
Write a function that returns all permutations of a list of distinct integers.
Combination Generator
Write a recursive function that returns all combinations of length k from a list of distinct integers.
Permutations II
Return all distinct permutations of a list of integers that may include duplicates.
Subsets
Return all subsets (the power set) of a list of distinct integers.
N-Queens Count
Count the number of distinct valid placements of n non-attacking queens on an n×n chessboard.
Letter Tile Possibilities
Given a string of letter tiles, count the number of distinct non-empty sequences that can be formed using any non-empty subset in any order.
Power set from set
Write a function to return the power set of a given list of distinct elements.
Combination Sum
Given a list of distinct positive integers and a target, return all unique combinations that sum to the target.
Rat in a Maze
Count the number of distinct paths a rat can take from top-left to bottom-right in a binary grid, moving down or right and avoiding walls.
Showing 1–24 of 32 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.