## Find the non decreasing order array from given array

Given an array A[] of size N / 2, the task is to construct the array B[] of size N such that: B[] is sorted… 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
- 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
- Unbounded Fractional Knapsack
- 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 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
- 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
- Fractional Knapsack Queries
- Count ways to divide circle using N non-intersecting chord | Set-2
- Find if a binary matrix exists with given row and column sums
- Minimum deletions required to make frequency of each letter unique
- Lexicographically smallest string of length N and sum K
- Minimum increment operations to make K elements equal
- Find Nth smallest number that is divisible by 100 exactly K times
- Queries for number of distinct elements from a given index till last index in an array
- Check if string can be rearranged so that every Odd length Substring is Palindrome
- Order of indices which is lexicographically smallest and sum of elements is <= X
- Find optimal weights which can be used to weigh all the weights in the range [1, X]
- Count total number of even sum sequences
- Minimum cost to convert str1 to str2 with the given operations

Given an array A[] of size N / 2, the task is to construct the array B[] of size N such that: B[] is sorted… Read More »

Given an integer X > 1 and an integer K > 0, the task is to find the greatest odd number < X such that… Read More »

Given two integers L and R, the task is to find the greatest divisor that divides all the natural numbers in the range [L, R].… Read More »

Given an array of 2 * n elements, the task is to construct and print an array of n element such that the mean of… Read More »

Given an array consisting of N positive integer numbers. The task is to remove exactly one element from this array to minimize max(a) – min(a)… Read More »

You have an unlimited number of 10-rupee coins and exactly one coin of r rupee and you need to buy minimum items each of cost… Read More »

Given an array arr[] of size n ≥ 3, the task is to find the minimum possible difference between the maximum and the minimum element… Read More »

Given an array of integers. The task is to find the minimum number of consecutive sequences that can be formed using the elements of the… Read More »

Given a string str and an integer array width[] where: width[0] = width of character ‘a’ width[1] = width of character ‘b’ … width[25] =… Read More »

Given two arrays of size N and two integers X and Y indicating the maximum number of elements one can pick from array A and… Read More »

Given an array arr of N (even) integer elements. The task is to check if it is possible to reorder the elements of the array… Read More »

Given an array of integers arr[], the task is to count the number of valid pairs of elements from arr. A pair (arr[x], arr[y]) is… Read More »

Given an array of integers. The task is to find the maximum sum of all the elements of the array after performing the given two… Read More »

Given an array of integers and an integer . It is allowed to modify an element either by increasing or decreasing them by k (only… Read More »

Prerequisite: Dijkstra’s shortest path algorithm Given an adjacency matrix graph representing paths between the nodes in the given graph. The task is to find the… Read More »