## Find the minimum value of X for an expression

Given an array arr[]. The task is t find the value of X such that the result of the expression (A[1] – X)^2 + (A[2]… Read More »

- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Find maximum meetings in one room
- Greedy approach vs Dynamic programming
- Largest substring with same Characters
- Find minimum changes required in an array for it to contain k distinct elements
- Maximum Length Chain of Pairs | Set-2
- Minimum number of pairs required to make two strings same
- Unbounded Fractional Knapsack
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Count of integers that divide all the elements of the given array
- Create a Sorted Array Using Binary Search
- Find minimum length sub-array which has given sub-sequence in it
- Count common elements in two arrays containing multiples of N and M
- Maximum distance between two unequal elements
- Maximum String Partition
- Minimum deletions required to make GCD of the array equal to 1
- Minimum operations required to make every element greater than or equal to K
- Minimum number of given operations required to reduce the array to 0 element
- Number of balanced parenthesis substrings
- Find the Kth smallest element in the sorted generated array
- Minimum deletions required such that any number X will occur exactly X times
- Longest Subarray having strictly positive XOR
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Smallest multiple of N formed using the given set of digits
- Minimizing array sum by applying XOR operation on all elements of the array
- Maximum possible sub-array sum after at most X swaps
- Fractional Knapsack Queries
- Count ways to divide circle using N non-intersecting chord | Set-2
- Find the minimum of maximum length of a jump required to reach the last island in exactly k jumps
- Find if a binary matrix exists with given row and column sums

Given an array arr[]. The task is t find the value of X such that the result of the expression (A[1] – X)^2 + (A[2]… Read More »

Given an integer N, the task is to find the minimum length string whose sum of each character (As a = 1, b = 2,… Read More »

Given N lecture timings, with their start time and end time (both inclusive), the task is to find the minimum number of halls required to… Read More »

Given two integers M and N, the task is to create a list of M non-negative integers whose sum is N. In case when more… Read More »

Given an array arr[] of positive integers, the task is to find the minimum steps to reduce all the elements to 0. In a single… Read More »

Given an integer N, the task is to count all possible sequences of length N such that all the elements of the sequence are from… Read More »

Given two strings of equal lengths str1 and str2 consisting of characters ‘a’ and ‘b’ only. The followig operations can be performed on str1: Any… Read More »

Given two arrays A[] and B[], the task is to find the integers which are divisible by all the elements of array A[] and divide… Read More »

Given the number of passengers entering and exiting the train, the task is to find the minimum capacity of the train to keep all the… Read More »

Given a range [L, R], the task is to find the count of numbers from this range that satisfy the below conditions: All the digit… Read More »

Given a string S consisting of lowercase characters, you have to delete the minimum number of characters from S so that every letter in S… Read More »

Given an array arr[] of N elements and an integer K, the task is to make any K elements of the array equal by performing… Read More »

Given an integer N, the task is to find a permutation of the integers from 1 to N such that is maximum. Examples: Input: N… Read More »

Given two integers N and K. The task is to print the lexicographically smallest string of length N consisting of lower-case English alphabates such that… Read More »

Given a string S. The task is to check whether it is possible to rearrange the string such that every substring of odd length is… Read More »