RecursionAndBacktracking

This repository contains the problems and their solutions in Java. I have tried to
explain all the steps by writing meaningful comments in the code. I have also tried
to provide the links of the problems so that you can practice those problems.

Problems covered :

  1. Subsequence with sum equal to K
  2. Print only one subsequence whose sum is eqaul to K (Variation of previous problem)
  3. Count of subsequences with sum equal to K (Leetcode_1498_Medium : https://leetcode.com/problems/number-of-subsequences-that-satisfy-the-given-sum-condition/)
  4. Combination sum (Leetcode_39_Medium : https://leetcode.com/problems/combination-sum/)
  5. Combination sum II (Leetcode_40_Medium : https://leetcode.com/problems/combination-sum-ii/)
  6. Subset sum I (GFG : https://practice.geeksforgeeks.org/problems/subset-sums2234/1)
  7. Subset sum II (Leetcode_90_Medium : https://leetcode.com/problems/subsets-ii/)
  8. Print all permutations of a string/array (Leetcode_46_Medium : https://leetcode.com/problems/permutations/)
  9. N Queens problem (Leetcode_51_Hard : https://leetcode.com/problems/n-queens/)
  10. Sudoku solver (Leetcode_37_Hard : https://leetcode.com/problems/sudoku-solver/)
  11. Palindrome partitioning (Leetcode_131_Medium : https://leetcode.com/problems/palindrome-partitioning/)
  12. Rat in a maze-I (GFG_Medium : https://practice.geeksforgeeks.org/problems/rat-in-a-maze-problem/1)
  13. Kth permutation sequence (Leetcode_60_Hard : https://leetcode.com/problems/permutation-sequence/)
  14. Delete middle element from stack
  15. Factorial of a number
  16. Fibonacci series
  17. Generate all balanced parenthesis
  18. Josephus problem
  19. Kth symbol in grammer
  20. Letter case permuation
  21. Palindromic string
  22. Permutations with case change
  23. Permutations with spaces
  24. Print 1 to N
  25. Print N to 1
  26. Print N to 1 using Backtracking
  27. Reverse array
  28. Print unique subsets
  29. Reverse stack
  30. Sort array using Recursion
  31. Sort stack using Recursion
  32. Tower of Hanoi
  33. Sum of first N numbers
  34. Sum of array using Recursion