# Category Archives: Recursion

Given an array A[]. The task is to count the number of subsequences such that concatenation of binary representation of the numbers represents palindrome. Examples:â€¦ Read More
Given an array Arr[] of size N and an integer K, the task is to find the length of the shortest subsequence having sum exactlyâ€¦ Read More
Given two arrays a[] and b[] and an integer K, the task is to find the length of the longest common subsequence such that sumâ€¦ Read More
Given two numbers N and K, the task is to find all valid combinations of at most K numbers that sum up to N suchâ€¦ Read More
Given two numbers N and K, the task is to find the count of all valid combinations of at most K numbers that sum upâ€¦ Read More
Given two strings s1 and s2, the task is to find the length of the longest common subsequence with no repeating character. Examples: Input: s1=â€¦ Read More
Given an array arr[] of size N that contains the differences between the adjacents elements of an array. The task is to generate all possibleâ€¦ Read More
Given two numbers N and r, find the value of NCr using recursion Examples: Input: N = 5, r = 2Output: 10Explanation: The value ofâ€¦ Read More
Given a binary tree, the task is to find the length of the longest path which forms an Arithmetic progression. The path can start andâ€¦ Read More
Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form.Examples: Input: arr[] =â€¦ Read More
Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form.Examples: Input: arr[] =â€¦ Read More
Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form.Examples: Input: arr[] =â€¦ Read More
Given an array arr[], the task is to find the number of rotations required to convert the given array to sorted form.Examples: Input: arr[] =â€¦ Read More
Given a Binary Tree rooted at root, the task is to find the sum of all leaf nodes which are left child of their parentsâ€¦ Read More
Given two integers N and K, the task is to print the first K bits of the Nth term of the Thue-Morse sequence. The Thue-Morseâ€¦ Read More