## Divide the array in K segments such that the sum of minimums is maximized

Given an array a of size N and an integer K, the task is to divide the array into K segments such that sum of… Read More »

- Print the last k nodes of the linked list in reverse order | Recursive approach
- Java Program to print distinct permutations of a string
- 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
- Minimum number of cubes whose sum equals to given number N
- Sum of the series 1^1 + 2^2 + 3^3 + ..... + n^n using recursion
- Detect cycle in the graph using degrees of nodes of graph
- Sum of nodes at maximum depth of a Binary Tree | Set 2
- Programs for printing pyramid patterns using recursion
- Split the array into equal sum parts according to given conditions
- Total number of possible Binary Search Trees using Catalan Number
- Print Stack Elements from Bottom to Top
- Find the value of ln(N!) using Recursion
- Find the node with maximum value in a Binary Search Tree using recursion
- Count number of ways to reach a given score in a Matrix
- Number of ways to choose elements from the array such that their average is K
- 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
- Number of subsets with zero sum
- Print path from root to all nodes in a Complete Binary Tree
- Merge two BSTs with constant extra space
- Sum of maximum of all subarrays | Divide and Conquer
- Delete nodes which have a greater value on right side using recursion
- Generate all unique partitions of an integer | Set 2
- Subset with sum closest to zero
- Count of numbers between range having only non-zero digits whose sum of digits is N and number is divisible by M
- Find 2^(2^A) % B
- Flip minimum signs of array elements to get minimum sum of positive elements possible
- Number of subsequences with zero sum

Given an array a of size N and an integer K, the task is to divide the array into K segments such that sum of… Read More »

Given a tree and a node, the task is to reverse the path till the given Node and print the in-order traversal of the modified… Read More »

Given a queue and the task is to sort it using recursion without using any loop. We can only use the following functions of queue:… Read More »

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 »