# Category Archives: Recursion

Given a binary tree, the task is to print the longest path from the root node to the leaf node. If there are multiple answers… Read More
Given two integers N and K, the task is to count the numbers up to N digits such that no two zeros are adjacents and… Read More
Given an array arr[] of N numbers. We can merge two adjacent numbers into one and the cost of merging the two numbers is equal… Read More
Given an undirected graph, the task is to count the maximum number of Bridges between any two vertices of the given graph.Examples:  Input: Graph 1… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to find the length of the longest subsequence with a… Read More
Given an array arr[] of N positive integers, the task is to count the number of array elements which can be expressed as the product… Read More
Given two integer N and K, the task is to find the number of sequence of length K consisting of values from the range [1,… Read More
Given a string str of length N, the task is to decrypt it using a given set of decryption rules and print the decrypted string. The… Read More
Given a binary tree of N nodes, the task is to print level order traversal in a spiral form. In spiral form, nodes at the… Read More
Binary Space Partitioning is implemented for recursively subdividing a space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise… Read More
Given a set of strings S and a string patt the task is to autocomplete the string patt to strings from S that have patt… Read More
Given an array arr[] of size N, the task is to find the number of times the array can be partitioned repetitively into two subarrays… Read More
Given a number N, the task is to find the minimum number of operations required to reduce the number N to zero by subtracting the… Read More
Given a grid of size N*M consists of 0 and 1 only, the task is to find the length of longest connected 1s in the… Read More
The Pentanacci series is a generalization of the Fibonacci sequence where each term is the sum of the five preceding terms. The first few Pentanacci… Read More