## Algorithms | Recurrences | Set 1

Question 1: Which of the following is the value of T3(n) where T3(n) is defined as T3(n) = 5*T3(n-1) – 4*T3(n-2) C1*5n + C2*4n C1… Read More »

- Recursively Reversing a linked list (A simple implementation)
- Print the last k nodes of the linked list in reverse order
- Check if a word exists in a grid or not
- Program to check if an array is palindrome or not using Recursion
- Print all permutations of a string in Java
- Generating subarrays using recursion
- Recursive program to print all subsets with given sum
- Count ways to reach a score using 1 and 2 with no consecutive 2s
- Java Program to print distinct permutations of a string
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Count all Grandparent-Parent-Child Triplets in a binary tree whose sum is greater than X
- Generating all possible Subsequences using Recursion
- Printing all subsets of {1,2,3,...n} without using array or loop
- Check whether the two Binary Search Trees are Identical or Not
- Print all paths from top left to bottom right in a matrix with four moves allowed
- Count all possible position that can be reached by Modified Knight
- Find Nth term (A matrix exponentiation example)
- Print all subsequences of a string using ArrayList
- Longest Ordered Subsequence of Vowels
- Algorithms | Recurrences | Set 1
- Count of Numbers in a Range divisible by m and having digit d in even positions
- Maximum length of segments of 0's and 1's
- Find the value of ln(N!) using Recursion
- Number of Binary Strings of length N with K adjacent Set Bits
- Double Knapsack | Dynamic Programming
- Split the array into equal sum parts according to given conditions
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Product of 2 numbers using recursion | Set 2
- Number of balanced bracket expressions that can be formed from a string
- Recursive Program for Binary to Decimal

Question 1: Which of the following is the value of T3(n) where T3(n) is defined as T3(n) = 5*T3(n-1) – 4*T3(n-2) C1*5n + C2*4n C1… Read More »

The problem is to print all the possible paths from top left to bottom right of an mXn matrix with the constraints that from each… Read More »

Given three integers N, M and K. The task is to find the number of ways to fill N positions using M colors such that… Read More »

Given an array and a number, print all subsets with sum equal to given the sum. Examples: Input : arr[] = {2, 5, 8, 4,… Read More »

Given an integer X and a binary tree, the task is to count the number of triplet triplets of nodes such that their sum is… Read More »

Given a string consisting of only vowels, find the longest subsequence in the given string such that it consists of all five vowels and is… Read More »

Given and . The task is to find the number of binary strings of length n out of 2n such that they satisfy f(bit string)… Read More »

Given some weights of masses a0, a1, a2, …, a100, a being an integer, and a weighing scale where weights can be put on both… Read More »

Given a K-ary tree, where each node is having K children and each edge has some weight. All the edges i.e. K, that goes from… Read More »

Given a string str comprising of characters (, ), {, }, [, ] and ?. The task is to find the total number of balanced… Read More »

Given three integers N, A and B, the task is to find whether N can be represented as sum of A’s and B’s. Examples: Input:… Read More »

Given three integers N, A and B, the task is to find whether N is divisible by any number that contains only A and B… Read More »

Given integers i, j, k and n where (i, j) is the initial position of the Knight on a n * n chessboard, the task… Read More »

Given a string, find minimum no of swaps(not necessarily adjacent) to convert it into a string which have similar characters side by side. Examples: Input… Read More »

A cricket player has to score N runs, with condition he can take either 1 or 2 runs only and consecutive runs should not be… Read More »