## Find maximum value of the last element after reducing the array with given operations

Given an array arr[] of N elements, you have to perform the following operation on the given array until the array is reduced to a… Read More »

- Minimum number of sets with numbers less than Y
- Remove exactly one element from the array such that max - min is minimum
- Spanning Tree With Maximum Degree (Using Kruskal's Algorithm)
- Given count of digits 1, 2, 3, 4, find the maximum sum possible
- Minimize the maximum minimum difference after one removal from array
- Find Intersection of all Intervals
- Find the maximum possible value of a[i] % a[j] over all pairs of i and j
- Optimal File Merge Patterns
- Minimum elements to be removed such that sum of adjacent elements is always odd
- Maximum number of candies that can be bought
- Minimum operations to make frequency of all characters equal K
- Rectangle with minimum possible difference between the length and the width
- Maximum distance between two unequal elements
- Count all possible N digit numbers that satisfy the given condition
- Minimum cuts required to convert a palindromic string to a different palindromic string
- Check whether a subsequence exists with sum equal to k if arr[i]> 2*arr[i-1]
- Find smallest number K such that K % p = 0 and q % K = 0
- Minimum number of pairs required to make two strings same
- Find the minimum number of steps to reach M from N
- Minimum LCM and GCD possible among all possible sub-arrays
- Find n positive integers that satisfy the given equations
- Divide a number into two parts
- Find the non decreasing order array from given array
- Greatest divisor which divides all natural number in range [L, R]
- Count possible moves in the given direction in a grid
- Count the pairs of vowels in the given string
- Maximum size of sub-array that satisfies the given condition
- Find the sum of digits of a number at even and odd places
- Maximum count of sub-strings of length K consisting of same characters
- Smallest multiple of N formed using the given set of digits

Given an array arr[] of N elements, you have to perform the following operation on the given array until the array is reduced to a… Read More »

Given two numbers N and K . The task is to find N’th smallest number that is divided by 100 exactly K times. Examples: Input… Read More »

Given an array of strings of length N, it is allowed to concatenate them in any order. Find the maximum possible number of occurrences of… Read More »

Given an array arr[] of N elements and an integer K, the task is to generate an B[] with the following rules: Copy elements arr[1…N],… Read More »

Given an array arr[] of N elements and an integer X, the task is to find the minimum number of operations required to make sum… Read More »

Given an array arr1 containing integers from 1..N and another array arr2 containing integers from 1..M. Each element of arr1 is mapped to more than… Read More »

Given an array arr[] and an integer X, the task is to find the indices such that: The sum of elements on the found indices… Read More »

Given two arrays such that the first array contains multiples of an integer n which are less than or equal to k and similarly, the… Read More »

Given an array Row[] of size R where Row[i] is the sum of elements of the ith row and another array Column[] of size C… Read More »

Given an array, the task is to create a new sorted array in ascending order from the elements of the given array. Examples: Input :… Read More »

Given an array of n-elements find the longest sub-array with the greatest arithmetic mean. The length of the sub-array must be greater than 1 and… Read More »

Given a sorted array of positive integers where arr[i] > 2*arr[i-1], check whether a sub sequence exists whose sum is equal to k. Examples: Input… Read More »

Given two arrays, we have to check whether we can sort two arrays in strictly ascending order by swapping A[i] and B[i]. Examples: Input :… Read More »

Given an array containing distinct positive integers and an integer k. The task is to find the largest possible k-multiple set from the array of… Read More »

Given an integer x. The task is to convert x to the form 2n – 1 by performing the following operations in specified order on… Read More »