Recursion Problems
Master recursion problems with AI-powered solutions. Get instant coding assistance during your technical interviews for all 37 problems in this category.
Total Problems: 37
Easy: 9
Medium: 17
Hard: 11
Showing 37 of 37 problems
Problems
Scroll within this area to browse all problems
#
Title
Difficulty
Recursion LeetCode Problems List
- 206. Reverse Linked List - Easy - RecursionGiven the head of a singly linked list, reverse the list, and return the reversed list.... Topics: Linked List, Recursion
- 21. Merge Two Sorted Lists - Easy - RecursionYou are given the heads of two sorted linked lists list1 and list2. Merge the two lists into one sorted list. The list should be made by splicing toge... Topics: Linked List, Recursion
- 1013. Fibonacci Number - Easy - RecursionThe Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding one... Topics: Math, Dynamic Programming, Recursion, Memoization
- 234. Palindrome Linked List - Easy - RecursionGiven the head of a singly linked list, return true if it is a palindrome or false otherwise.... Topics: Linked List, Two Pointers, Stack, Recursion
- 25. Reverse Nodes in k-Group - Hard - RecursionGiven the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is a positive integer and is less than or ... Topics: Linked List, Recursion
- 224. Basic Calculator - Hard - RecursionGiven a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation. Note: You are ... Topics: Math, String, Stack, Recursion
- 2. Add Two Numbers - Medium - RecursionYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes conta... Topics: Linked List, Math, Recursion
- 394. Decode String - Medium - RecursionGiven an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is be... Topics: String, Stack, Recursion
- 231. Power of Two - Easy - RecursionGiven an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such th... Topics: Math, Bit Manipulation, Recursion
- 10. Regular Expression Matching - Hard - RecursionGiven an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.... Topics: String, Dynamic Programming, Recursion
- 143. Reorder List - Medium - RecursionYou are given the head of a singly linked-list. The list can be represented as: L0 → L1 → … → Ln - 1 → Ln Reorder the list to be on the following form... Topics: Linked List, Two Pointers, Stack, Recursion
- 326. Power of Three - Easy - RecursionGiven an integer n, return true if it is a power of three. Otherwise, return false. An integer n is a power of three, if there exists an integer x suc... Topics: Math, Recursion
- 241. Different Ways to Add Parentheses - Medium - RecursionGiven a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and op... Topics: Math, String, Dynamic Programming, Recursion, Memoization
- 44. Wildcard Matching - Hard - RecursionGiven an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where: '?' Matches any single character.... Topics: String, Dynamic Programming, Greedy, Recursion
- 342. Power of Four - Easy - RecursionGiven an integer n, return true if it is a power of four. Otherwise, return false. An integer n is a power of four, if there exists an integer x such ... Topics: Math, Bit Manipulation, Recursion
- 1197. Parsing A Boolean Expression - Hard - RecursionA boolean expression is an expression that evaluates to either true or false. It can be in one of the following shapes: 't' that evaluates to true. 'f... Topics: String, Stack, Recursion
- 390. Elimination Game - Medium - RecursionYou have a list arr of all integers in the range [1, n] sorted in a strictly increasing order. Apply the following algorithm on arr: Starting from lef... Topics: Math, Recursion
- 50. Pow(x, n) - Medium - RecursionImplement pow(x, n), which calculates x raised to the power n (i.e., xn).... Topics: Math, Recursion
- 2050. Count Good Numbers - Medium - RecursionA digit string is good if the digits (0-indexed) at even indices are even and the digits at odd indices are prime (2, 3, 5, or 7). For example, "2582"... Topics: Math, Recursion
- 203. Remove Linked List Elements - Easy - RecursionGiven the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.... Topics: Linked List, Recursion
- 273. Integer to English Words - Hard - RecursionConvert a non-negative integer num to its English words representation.... Topics: Math, String, Recursion
- 781. Basic Calculator IV - Hard - RecursionGiven an expression such as expression = "e + 8 - a + 5" and an evaluation map such as {"e": 1} (given in terms of evalvars = ["e"] and evalints = [1]... Topics: Hash Table, Math, String, Stack, Recursion
- 24. Swap Nodes in Pairs - Medium - RecursionGiven a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i... Topics: Linked List, Recursion
- 763. Special Binary String - Hard - RecursionSpecial binary strings are binary strings with the following two properties: The number of 0's is equal to the number of 1's. Every prefix of the bina... Topics: String, Recursion
- 795. K-th Symbol in Grammar - Medium - RecursionWe build a table of n rows (1-indexed). We start by writing 0 in the 1st row. Now in every subsequent row, we look at the previous row and replace eac... Topics: Math, Bit Manipulation, Recursion
- 486. Predict the Winner - Medium - RecursionYou are given an integer array nums. Two players are playing a game with this array: player 1 and player 2. Player 1 and player 2 take turns, with pla... Topics: Array, Math, Dynamic Programming, Recursion, Game Theory
- 233. Number of Digit One - Hard - RecursionGiven an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.... Topics: Math, Dynamic Programming, Recursion
- 3601. Find the K-th Character in String Game II - Hard - RecursionAlice and Bob are playing a game. Initially, Alice has a string word = "a". You are given a positive integer k. You are also given an integer array op... Topics: Math, Bit Manipulation, Recursion
- 930. All Possible Full Binary Trees - Medium - RecursionGiven an integer n, return a list of all possible full binary trees with n nodes. Each node of each tree in the answer must have Node.val == 0. Each e... Topics: Dynamic Programming, Tree, Recursion, Memoization, Binary Tree
- 1951. Find the Winner of the Circular Game - Medium - RecursionThere are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, movin... Topics: Array, Math, Recursion, Queue, Simulation
- 60. Permutation Sequence - Hard - RecursionThe set [1, 2, 3, ..., n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following s... Topics: Math, Recursion
- 1667. Find Kth Bit in Nth Binary String - Medium - RecursionGiven two positive integers n and k, the binary string Sn is formed as follows: S1 = "0" Si = Si - 1 + "1" + reverse(invert(Si - 1)) for i > 1 Where +... Topics: String, Recursion, Simulation
- 2573. Remove Nodes From Linked List - Medium - RecursionYou are given the head of a linked list. Remove every node which has a node with a greater value anywhere to the right side of it. Return the head of ... Topics: Linked List, Stack, Recursion, Monotonic Stack
- 3600. Find the K-th Character in String Game I - Easy - RecursionAlice and Bob are playing a game. Initially, Alice has a string word = "a". You are given a positive integer k. Now Bob will ask Alice to perform the ... Topics: Math, Bit Manipulation, Recursion, Simulation
- 2680. Count Collisions of Monkeys on a Polygon - Medium - RecursionThere is a regular convex polygon with n vertices. The vertices are labeled from 0 to n - 1 in a clockwise direction, and each vertex has exactly one ... Topics: Math, Recursion
- 3843. Partition Array into Two Equal Product Subsets - Medium - RecursionYou are given an integer array nums containing distinct positive integers and an integer target. Determine if you can partition nums into two non-empt... Topics: Array, Bit Manipulation, Recursion, Enumeration
- 2100. Minimum Non-Zero Product of the Array Elements - Medium - RecursionYou are given a positive integer p. Consider an array nums (1-indexed) that consists of the integers in the inclusive range [1, 2p - 1] in their binar... Topics: Math, Greedy, Recursion
Related LeetCode Topics
- Array LeetCode Problems
- Backtracking LeetCode Problems
- Biconnected Component LeetCode Problems
- Binary Indexed Tree LeetCode Problems
- Binary Search LeetCode Problems
- Binary Search Tree LeetCode Problems
- Binary Tree LeetCode Problems
- Bit Manipulation LeetCode Problems
- Bitmask LeetCode Problems
- Brainteaser LeetCode Problems
- Breadth-First Search LeetCode Problems
- Bucket Sort LeetCode Problems
- Combinatorics LeetCode Problems
- Concurrency LeetCode Problems
- Counting LeetCode Problems
- Counting Sort LeetCode Problems
- Data Stream LeetCode Problems
- Database LeetCode Problems
- Depth-First Search LeetCode Problems
- Design LeetCode Problems