Given two integers X and Y, the task is to check if it is possible to reach (X, Y) from (1, 1) by the following… Read More
Category Archives: Recursion
Given a Binary Tree consisting of N nodes and two integers R and K. Each edge of the tree has a positive integer associated with… Read More
Given an integer X and integer N, the task is to find the number of unique paths starting from the root in N-ary tree such… Read More
Given integers N and K representing the number of batches and number of students in each batch respectively, and a 2D array ratings[][] of size… Read More
Given two positive integers X and Y, the task is to check if it is possible to reach (X, Y) from (1, 0) by the… Read More
Given two integers N and K, the task is to find the number of N-length arrays that can be generated by using the values 0,… Read More
Given a Binary Tree and an integer K, the task is to delete nodes from the given Tree such that the sum of all nodes… Read More
Given an array arr[] consisting of N positive integers, the task is to find the maximum length of subsequence from the given array such that… Read More
Given N distinct objects, the task is to find the number of distinct arrangements of N objects if all clockwise arrangements are considered the same.… Read More
Given three positive integers L, R, and K, the task is to find the count of numbers in the range [L, R] having K consecutive… Read More
Given three integers A, B, C denoting a triplet and three integers P, Q, R denoting another triplet. Repeatedly select any integer and add or… Read More
Given a string S of length N, consisting of lowercase English alphabets only, the task is to find the minimum possible length of run-length-encoding that… Read More
Given two integers N and K, the task is to count the number of permutations of the first N natural numbers having exactly K inversions.… Read More
Given a matrix, mat[][] of dimensions N * M, the task is to print the maximum bitwise XOR value that can be obtained for a… Read More