Additive number sequence
Check whether a given digit string can be partitioned into a valid additive sequence where each term is the sum of the previous two.
Path Sum II All Paths
Return all root-to-leaf paths where the sum of node values equals a target.
Reconstruct Itinerary
Given a list of airline tickets, reconstruct the itinerary in order using each ticket exactly once, choosing the lexicographically smallest path when multiple options exist.
N-Queens Solutions
Implement a function to count the number of distinct ways to place n queens on an n×n board.
Matchsticks to Square
Given a list of matchstick lengths, decide if they can form a square by using each matchstick exactly once.
Knight Tour Count
Implement a backtracking search to count all ways a knight can visit every cell on a 5x5 board exactly once starting from (0,0).
Shortest Common Supersequence
Given two strings, return any shortest supersequence that contains both as subsequences.
Hamiltonian Path Check
Implement a function that checks whether an undirected graph has a Hamiltonian path using DFS and backtracking.
All Paths from Source to Target
Given a directed acyclic graph, return all paths from node 0 to the last node.
Graph Coloring Backtrack
Given an adjacency list and a number of colors, decide if the graph can be colored so no adjacent vertices share a color.
Android unlock patterns
Count the number of valid Android unlock patterns of a given length using a 3x3 grid with adjacency constraints.
Wildcard Match (Simple)
Write a function that checks whether a string matches a pattern with '*' and '?' wildcards.
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.
Generate Parentheses
Given n, generate all valid strings of n pairs of parentheses.
Letter Combinations of a Phone Number
Given a string of digits, return all possible letter combinations that the number could represent on a phone keypad.
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.
Showing 1–24 of 31 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.