## Distinct strings such that they contains given strings as sub-sequences

Given two strings str1 and str2 of lengths M and N respectively. The task is to find all the distinct string of length M +… Read More »

- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Double Knapsack | Dynamic Programming
- Generate all the binary strings of N bits
- Detect cycle in the graph using degrees of nodes of graph
- Sum of the series 1^1 + 2^2 + 3^3 + ..... + n^n using recursion
- Number of subsets with zero sum
- Minimum number of cubes whose sum equals to given number N
- Total number of possible Binary Search Trees using Catalan Number
- Programs for printing pyramid patterns using recursion
- Merge two BSTs with constant extra space
- Count number of ways to reach a given score in a Matrix
- Find the node with maximum value in a Binary Search Tree using recursion
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Divide the array in K segments such that the sum of minimums is maximized
- Number of ways to choose elements from the array such that their average is K
- Print path from root to all nodes in a Complete Binary Tree
- Maximum sum of non-overlapping subarrays of length atmost K
- Sum of maximum of all subarrays | Divide and Conquer
- Check if the given binary tree has a sub-tree with equal no of 1's and 0's | Set 2
- Subset with sum closest to zero
- Print Binary Search Tree in Min Max Fashion
- Maximum number of given operations to remove the entire string
- Generate all unique partitions of an integer | Set 2
- Reverse tree path using Queue
- Algorithms Sample Questions | Set 3 | Time Order Analysis
- Recursive program to find all Indices of a Number
- Sort the Queue using Recursion
- Add one to a number represented as linked list | Set 2
- Burn the binary tree starting from the target node
- Find 2^(2^A) % B

Given two strings str1 and str2 of lengths M and N respectively. The task is to find all the distinct string of length M +… Read More »

Given an array arr[] of strings, the task is to print the strings from the array which are not prefix of any other string from… Read More »

Given two strings str1 and str2 each of length N, the task is to generate and print all possible strings of length N such that… Read More »

Given an integer N, the task is convert and print the binary equaiva;ent of N. Examples: Input: N = 13 Output: 1101 Input: N =… Read More »

The standard Tower of Hanoi problem is explained here . In the standard problem, all the disc transactions are considered identical. Given a 3×3 matrix… Read More »

Given an in-order traversal of a cartesian tree, the task is to build the entire tree from it. Examples: Input: arr[] = {1, 5, 3}… Read More »

Given a singly linked list which represents a number where each node contains only one digit [0 – 9]. The task is to add 1… Read More »

Given an array of positive elements, you have to flip the sign of some of its elements such that the resultant sum of the elements… Read More »

What is Recursion? The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called as recursive… Read More »

Given an integer N, the task is to count the number of possible Binary Search Trees with N keys. Examples: Input: N = 2 Output:… Read More »

Given a Binary Search Tree, the task is to find the node with maximum value. Examples: Input: Output: 22 Recommended: Please try your approach on… Read More »

Given an integer array ‘arr’ of length N and an integer ‘k’, select some non-overlapping subarrays such that each sub-array if of length at most… Read More »

Given two Binary Search Trees(BST), print the elements of both BSTs in sorted form. Note: Both the BSTs will not have any common element. Examples:… Read More »

Given an array arr[] of N integers and an integer K. The task is to find the number of ways to select one or more… Read More »

Given an array ‘arr’ consisting of integers, the task is to find the non-empty subset such that its sum is closest to zero i.e. absolute… Read More »