## Generate an array of K elements such that sum of elements is N and the condition a[i] < a[i+1] <= 2*a[i] is met | Set 2

Given two integers N and K, the task is to generate an array arr[] of length K such that: arr[0] + arr[1] + … +… 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
- Count the pairs of vowels in the given string
- Find minimum changes required in an array for it to contain k distinct elements
- Largest substring with same Characters
- Maximum Length Chain of Pairs | Set-2
- Minimum number of pairs required to make two strings same
- Unbounded Fractional Knapsack
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- 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
- Move all zeros to start and ones to end in an Array of random integers
- 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
- Number of balanced parenthesis substrings
- Minimum number of given operations required to reduce the array to 0 element
- Find the Kth smallest element in the sorted generated array
- Longest Subarray having strictly positive XOR
- Minimum deletions required such that any number X will occur exactly X times
- 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
- Maximum possible sub-array sum after at most X swaps
- Minimizing array sum by applying XOR operation on all elements of the array
- Find the minimum of maximum length of a jump required to reach the last island in exactly k jumps

Given two integers N and K, the task is to generate an array arr[] of length K such that: arr[0] + arr[1] + … +… Read More »

Given a positive integer N. The task is to find the maximum number that can be displayed on seven segment display using N segments. Seven… Read More »

Given two n * m matrices A[][] and B[][], the task is to make both the matrices strictly increasing (both rows and columns) only by… Read More »

Given an array arr[] of N integers. The task is to find the minimum number of given operations required to reduce the array to 0… Read More »

Given a set of digits S and an integer N, the task is to find the smallest positive integer if exists which contains only the… Read More »

Given an array arr[] of size N, the task is to count the number of ways we can select a subset from the given array… Read More »

Given a large number of N digits. We are also given with 10 numbers which represents the alternate number for all the one-digit numbers from… Read More »

Given an array arr[] of N integer elements, the task is to choose an element X and apply XOR operation on every element of the… Read More »

There are two cash lockers, one has X number of coins and the other has Y number of coins, you can withdraw money at max… Read More »

Given an array arr[] of integers, where the ith integer represents the position where an island is present, and an integer k (1 ≤ k… Read More »

Given an array of N elements and you can perform two operations on it: Increase any of the array element by X once. Decrease any… Read More »

Given a binary array of N elements and two initial values a and b. We can cross the i-th element if: If a[i] == 0,… Read More »

Given a number N, the task is to find the largest number less than or equal to the given number N such that on rearranging… Read More »

Given an array arr[] of random integers, the task is to push all the zero’s in the array to the start and all the one’s… Read More »