Permutations
Write a function that returns every permutation of the elements in the input list.
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.
Subsets II
Given a collection of integers that might contain duplicates, return all possible unique subsets.
N-Queens Count
Count the number of distinct valid placements of n non-attacking queens on an n×n chessboard.
Word Search Backtrack
Determine if a given word exists in a 2D board by tracing adjacent cells without reusing any cell.
Palindrome Partitioning
Given a string s, return all possible palindrome partitioning of s.
Partition to k subsets
Determine if an array of positive integers can be partitioned into k subsets of equal sum using backtracking.
Remove invalid parentheses
Given a string with parentheses and letters, return all valid strings after removing the minimum number of invalid parentheses.
Partition Equal Subset Sum (Backtracking)
Write a function that uses backtracking to decide if a list of positive integers can be partitioned into two subsets with equal sum.
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.
Beautiful Arrangement Count
Count the number of permutations of 1..n such that for every index i, either i is divisible by the number at that position or the number is divisible by i.
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.
Hamiltonian Cycle Backtrack
Implement a backtracking algorithm to find a Hamiltonian cycle in an undirected graph.
Stock Buy Sell Once
Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.
Candy Distribution
Compute the minimum total candies needed so that every child gets at least one and children with higher ratings than neighbors get more candies.
Assign Cookies
Given child greed factors and cookie sizes, return the maximum number of content children.
Lemonade Change
Simulate a lemonade stand and decide if you can provide change for each customer using only $5, $10, and $20 bills.
Partition Labels
Partition a string into maximal parts where each character appears in only one part, returning part lengths.
Remove K Digits to Form the Smallest Number
Given a non-negative integer as a string, remove exactly k digits to form the smallest possible integer without leading zeros.
Meeting Rooms Minimum
Given a list of meeting time intervals, compute the minimum number of conference rooms required.
Maximize units on truck
Given box types with count and units per box, maximize total units loaded onto a truck.
Showing 673–696 of 925 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.