## Minimize the sum of roots of a given polynomial

Given an array whose elements represents the coefficients of a polynomial of degree n, if the polynomial has a degree n then the array will… Read More »

Given an array whose elements represents the coefficients of a polynomial of degree n, if the polynomial has a degree n then the array will… Read More »

Implementing priority CPU scheduling. In this problem, we are using Min Heap as the data structure for implementing priority scheduling. In this problem smaller numbers… Read More »

Given an array arr containing elements from [1…to n]. Each element appears exactly once in the array arr. Given an string str of length n-1.… Read More »

Consider an array of size n with initial 0 values. How many indices will contain value at least x after performing m range updates. In… Read More »

Given two array of size n and m. The task is to find the number of ways we can merge the given arrays into one… Read More »

Given a bracket sequence or in other words a string S of length n, consisting of characters ‘(‘ and ‘)’. Find length of the maximum… Read More »

Given an array a[1..N]. For each element at position i (1 <= i <= N). Where L(i) is defined as closest index j such that… Read More »

Given an array and two numbers M and K. We need to find sum of max M subarrays of size K (non-overlapping) in the array.… Read More »

Given an array of n-positive elements. Sub-array sum is defined as the sum of all elements of a particular sub-array, the task is to find… Read More »

Given an array, we need to calculate the Sum of Bit-wise AND of all possible subsets of given array. Examples: Input : 1 2 3… Read More »

Given n elements, write a program that prints the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[] = {3, 10,… Read More »

Given N elements, write a program that prints the length of the longest increasing subsequence whose adjacent element difference is one. Examples: Input : a[]… Read More »

Given two arrays with size n, maximize the first array by using the elements from the second array such that the new array formed contains… Read More »

Given an array of integers, segregate even and odd numbers in the array. All the even numbers should be present first, and then the odd… Read More »

Consider the given array arr[], we need to find if we can sort array with given operation. We are only allowed to reverse subarray such… Read More »