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
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.
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.
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.
Showing 1–8 of 8 challenges · Recursion & Backtracking
Recursion & Backtracking — Python coding challenges
What you will find here
This page lists recursion & backtracking challenges — real Python problems you solve in the browser IDE with instant test feedback. Each challenge includes a clear brief, starter code, and automated checks.
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.