0% found this document useful (0 votes)
3 views

recursion

The document outlines a series of programming challenges related to recursion and combinatorial problems, including calculating powers, finding super digits, generating subsets and permutations, and solving pathfinding and partitioning problems. Each question is linked to its respective problem page on platforms like LeetCode and HackerRank. Additionally, it includes contact information for TeachToTech.

Uploaded by

kataratanmay55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

recursion

The document outlines a series of programming challenges related to recursion and combinatorial problems, including calculating powers, finding super digits, generating subsets and permutations, and solving pathfinding and partitioning problems. Each question is linked to its respective problem page on platforms like LeetCode and HackerRank. Additionally, it includes contact information for TeachToTech.

Uploaded by

kataratanmay55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

TeachToTech

[email protected]

Recursion

Q1. Implement pow(x,n), which calculates x raised to the power n (i.e., xn).
Link - https://leetcode.com/problems/powx-n/description/

Q2. We define super digit of an integer using the following rules:


Given an integer, we need to find the super digit of the integer.
 If has x only 1 digit, then its super digit is x.
 Otherwise, the super digit of x is equal to the super digit of the sum of the
digits of x.
Link - Recursive Digit Sum | HackerRank

Q3. Leetcode – 1922 count good numbers


Link - Count Good Numbers - LeetCode

Q4. Given an integer array nums of unique elements, return all


possible subsets (the power set).
The solution set must not contain duplicate subsets. Return the solution in any
order.
Link - Subsets - LeetCode

Q5. Given an integer array nums that may contain duplicates, return all
possible subsets (the power set).
The solution set must not contain duplicate subsets. Return the solution in any
order.
Link - Subsets II - LeetCode

Q6. Given a string containing digits from 2-9 inclusive, return all possible letter
combinations that the number could represent. Return the answer in any order.
A mapping of digits to letters (just like on the telephone buttons) is given below.
Note that 1 does not map to any letters.
Link - https://leetcode.com/problems/letter-combinations-of-a-phone-
number/description/

Q7. There is a robot on an m x n grid. The robot is initially located at the top-left
corner (i.e., grid[0][0]). The robot tries to move to the bottom-right
corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any
point in time.
Given the two integers m and n, return the number of possible unique paths that
the robot can take to reach the bottom-right corner.

Contact: + 911204480203 | www.teachtotech.in


TeachToTech
[email protected]

The test cases are generated so that the answer will be less than or equal to 2 *
109.

Link - https://leetcode.com/problems/unique-paths/description/

Q8. Given an array nums of distinct integers, return all the possible permutations.
You can return the answer in any order.
Link -
https://leetcode.com/problems/permutations/description/?envType=problem-list-
v2&envId=backtracking

Q9. Given a string s and a dictionary of strings wordDict, return true if s can be
segmented into a space-separated sequence of one or more dictionary words.
Link - https://leetcode.com/problems/word-break/description/

Q10. You are given an integer array nums and an integer target.
You want to build an expression out of nums by adding one of the
symbols '+' and '-' before each integer in nums and then concatenate all the
integers.
Link - https://leetcode.com/problems/target-sum/description/?envType=problem-
list-v2&envId=backtracking

Q11. Given n pairs of parentheses, write a function to generate all combinations


of well-formed parentheses.
Link - https://leetcode.com/problems/generate-
parentheses/description/?envType=problem-list-v2&envId=backtracking

Q12. Given a collection of numbers, nums, that might contain duplicates,


return all possible unique permutations in any order.
Link - Permutations II - LeetCode

Q13. Given a string s, partition s such that every substring of the partition is
a palindrome. Return all possible palindrome partitioning of s.
Link - Palindrome Partitioning - LeetCode

Q14. Transformation A to B
Link - Problem - A - Codeforces

Q15. Pyramid Of Glasses


Link - Problem - B - Codeforces

Contact: + 911204480203 | www.teachtotech.in


TeachToTech
[email protected]

Q16. Rat in a maze


Link - Rat in a Maze Problem - I | Practice | GeeksforGeeks

Q17. Given an array of positive integers arr[] and a value sum, determine if there
is a subset of arr[] with sum equal to given sum.
Link - Subset Sum Problem | Practice | GeeksforGeeks

Q18. Given an integer array nums, return true if you can partition the array into
two subsets such that the sum of the elements in both subsets is equal
or false otherwise.
Link - Partition Equal Subset Sum - LeetCode

Q19. Josephus problem


Link - Josephus problem | Practice | GeeksforGeeks

Q20. Standard questions – Nqueens, sudoku solver

Contact: + 911204480203 | www.teachtotech.in

You might also like