Recursion LeetCode Problems: All 45,
With Python Solutions

Every problem in this library that LeetCode tags Recursion. 36 of them carry a complete Python solution, a worked example and the time and space complexity of the approach.

Easy
9
Medium
22
Hard
14

Recursion problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (9)

Easy problems
No.Problem
0021Merge Two Sorted Lists
0203Remove Linked List Elements
0206Reverse Linked List
0231Power of Two
0234Palindrome Linked List
0326Power of Three
0342Power of Four
0509Fibonacci Number
2094Finding 3-Digit Even Numbers

Medium (22)

Medium problems
No.Problem
0002Add Two Numbers
0024Swap Nodes in Pairs
0050Pow(x, n)
0143Reorder List
0241Different Ways to Add Parentheses
0390Elimination Game
0394Decode String
0486Predict the Winner
0779K-th Symbol in Grammar
0894All Possible Full Binary Trees
1545Find Kth Bit in Nth Binary String
1823Find the Winner of the Circular Game
1922Count Good Numbers
1969Minimum Non-Zero Product of the Array Elements
2487Remove Nodes From Linked List
2550Count Collisions of Monkeys on a Polygon
0247Strobogrammatic Number IIPremium
0255Verify Preorder Sequence in Binary Search TreePremium
0439Ternary Expression ParserPremium
0544Output Contest MatchesPremium
0776Split BSTPremium
1265Print Immutable Linked List in ReversePremium

Hard (14)

Hard problems
No.Problem
0010Regular Expression Matching
0025Reverse Nodes in k-Group
0044Wildcard Matching
0060Permutation Sequence
0224Basic Calculator
0233Number of Digit One
0273Integer to English Words
0736Parse Lisp Expression
0761Special Binary String
1106Parsing A Boolean Expression
1808Maximize Number of Nice Divisors
0248Strobogrammatic Number IIIPremium
0770Basic Calculator IV
0772Basic Calculator IIIPremium

Eyes only

When the Recursion problem arrives live.

In the live round, Stealth Interview reads the problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer says. It's a desktop app for macOS and Windows, invisible to screen sharing.