Given an array arr[] consisting of integers. The task is to find minimum deletions required to remove the initial minimum and maximum element from arr[].NOTE:… Read More

# Category Archives: Arrays

Given two sorted arrays A[] and B[] consisting of N and M integers respectively, the task is to find the Kth smallest number in the… Read More

Given an array arr[] consisting of N integers, the task is to find the maximum count of integers that are binary searchable in the given… Read More

Given an array arr[] of size N and an integer X, the task is to find the length of the longest subsequence such that the… Read More

Given two arrays arr1[] and arr2[] of size N and N – 1 respectively. Each value in arr2[] is obtained by adding a hidden value… Read More

Given an array arr containing N unique integers. The task is to calculate the minimum number of deques required to make the array sorted. Example: … Read More

Given an array arr[] of N integers and a positive integer K, the task is to find the minimum number of operations required to reduce… Read More

Given an array arr[] of N integers, the task is to find the number of pairs of array elements (arr[i], arr[j]) such that the difference… Read More

Given an array arr[] of N integers and an integer D, the task is to find the length of the longest non-decreasing subsequence such that… Read More

Given a positive integer K and an array arr[] consisting of {numerator, denominator} of N fractions, the task is to find the sum of the… Read More

Given two arrays A[] and B[] both consisting of N integers, the task is to find the number of non-decreasing arrays of size N that… Read More

Given an array arr[] of N integers, the task is to find the lexicographically largest permutation by sequentially inserting the array elements to the front… Read More

Given an array arr[] of N integers, the task is to find the maximum count of K, i.e, consecutive integers from 0 to K, that… Read More

Given an array arr[] of size N and two integers X and Y, the task is to find the minimum cost required to modify the… Read More

Given an array arr[] of N integers, the task is to find the next non-zero array element to the right of every array element. If… Read More