## Count number of permutation of an Array having no SubArray of size two or more from original Array

Given an array of distinct integer A, the task is to count the number of possible permutations of the given array A[] such that the… Read More »

- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- 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
- Total number of possible Binary Search Trees using Catalan Number
- Minimum number of cubes whose sum equals to given number N
- Programs for printing pyramid patterns using recursion
- Count number of ways to reach a given score in a Matrix
- Merge two BSTs with constant extra space
- 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
- Sum of maximum of all subarrays | Divide and Conquer
- Maximum sum of non-overlapping subarrays of length atmost K
- 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
- Burn the binary tree starting from the target node
- Reverse tree path using Queue
- Recursive program to find all Indices of a Number
- Generate all unique partitions of an integer | Set 2
- Algorithms Sample Questions | Set 3 | Time Order Analysis
- Sort the Queue using Recursion
- Add one to a number represented as linked list | Set 2
- Find 2^(2^A) % B
- Program to Calculate e^x by Recursion

Given an array of distinct integer A, the task is to count the number of possible permutations of the given array A[] such that the… Read More »

Given a Binary Tree, print Bottom-Right view of it. The Bottom Right view of a Binary Tree is a set of nodes visible when the… Read More »

Given a number N. The task is to find the number of set bits in its binary representation using recursion. Examples: Input : 21 Output… Read More »

Given a list or array of integer, the task is to print all such subsequences of this list such in which the elements are arranged… Read More »

Given a Linked List. The task is to traverse the Linked List from middle to left-right order using recursion. For Example: If the given Linked… Read More »

The task is to find the triangle of numbers arising from Gilbreath’s conjecture. Gilbreath’s conjecture: It is observed that given a sequence of prime numbers,… Read More »

It is highly recommended to fully understand Proto Van Emde Boas Tree. Van Emde Boas Tree supports search, successor, predecessor, insert and delete operations in… Read More »

Given two integers A and B. The task is to find the nearest greater value to B by interchanging the digits of A. If no… Read More »

Please see previous articles on Proto Van Emde Boas Tree to understand these properly. Procedure for Insert: Base Case: If the size of Proto-VEB is… Read More »

Please check previous sets of Proto Van Emde Boas Tree article first. It is highly recommended. Procedure for delete: Base Case: If we reach at… Read More »

Please check previous sets of Proto Van Emde Boas Tree article first. It is highly recommended. Procedure for finding minimum: Base Case: If the size… Read More »

Please refer all previous articles on Proto Van Emde Boas Tree first. Successor Query Procedure: Base case: For Proto-VEB of size 2 the only possibility… Read More »

This article is aimed at giving a recursive implementation for pattern printing. Pattern 1: Example: Input: 5 Output: * * * * * * *… Read More »

Given an array arr[] of integers, the task is to find the sum of even elements from the array. Examples: Input: arr[] = {1, 2,… Read More »

Given string str of size N. The task is to write a recursive function to replace all occurrences of pi with 3.14 in the given… Read More »