## Minimize the sum after choosing elements from the given three arrays

Given three arrays A[], B[] and C[] of same size N. The task is to minimize the sum after choosing N elements from these array… 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 three arrays A[], B[] and C[] of same size N. The task is to minimize the sum after choosing N elements from these array… Read More »

Given an integer array arr[] of length N and an integer K, the task is to select some non-overlapping sub-arrays such that each sub-array is… Read More »

Given a maze which is a N * N grid grid[][]. Every cell of the maze contains either the number 1, 2 or 3 which… Read More »

Given an array with positive integers. The task is to find the factorial of all the array elements. Note: As the numbers would be very… Read More »

Given three integer n, h and p where n is the number of topics, h is the time left (in hours) and p is the… Read More »

Question 1: What is the asymptotic boundary of T(n)? θ( n*log(n) ) θ( n2 ) θ( n ) θ( n*log2(n) ) θ( n2*log2(n) ) Answer:… Read More »

The value of Exponential function can be calculated using Taylor Series. = 1 + x/1! + /2! + /3! + …… To find its value… Read More »

Question 1: What is the complexity of T(n)? Θ( 1⁄n ) Θ( 1⁄n2 ) Θ( 1 ) Θ( ln( n ) ) Answer: 3 Explanation:… Read More »

Given an array ‘arr’ consisting of integers, the task is to find the number of subsets such that their sum is equal to zero. Empty… Read More »

Given an array arr[] of length N, the task is to find the sum of the maximum elements of every possible sub-array of the array.… Read More »

Given an array arr[] of N integers, you can select some indexes such that every selected index has exactly one other selected index adjacent to… Read More »

Given a positive integer n, the task is to generate all possible unique ways to represent n as sum of positive integers. Examples: Input: 4… Read More »

Given an N * N matrix arr[][] consisting of non-negative integers, the task is to find the number of ways to reach arr[N – 1][N… Read More »

Given an N-ary tree and an array val[] which stores the values associated with all the nodes. Also given are a leaf node X and… Read More »

Given a complete binary tree, the task is to find the sum of mirror image nodes in an inorder way i.e. find the inorder traversal… Read More »