Given an array arr[] consisting of N integers, the task is to find the minimum number of array elements that must be removed such that… Read More

# Category Archives: Hash

Given two arrays A[] and B[] consisting of N integers where A[i] represents the initial position of the ith plane and B[i] is the speed… Read More

Given an array arr[] consisting of N distinct positive integers and a range [L, R], the task is to find the element in the given… Read More

Given an array arr[] consisting of N integers, the task is to find the maximum element with the minimum frequency. Examples: Input: arr[] = {2,… Read More

Given an array A[] of size N, for each index i in the range [0, N) the value A[i] denotes the size of the connected… Read More

Given an array arr[] consisting of N positive integers, the task is to find the number of pairs such that the Greatest Common Divisor(GCD) of… Read More

Given an array arr[] consisting of N positive integers, the task is to count the number of pairs in the array, say (a, b) such… Read More

Given an array arr, the task is to perform operations on the array when all elements in the array are even. In one operation, replace… Read More

Given N ranges of the form L to R, the task is to find the maximum occurred integer in all the ranges. If more than… Read More

Minimize steps to form string S from any random string of length K using a fixed length subsequences

Given a string S consisting of N characters and a positive integer K, the task is to find the minimum number of operations required to… Read More

Given an array arr[] consisting of N integers, the task is to check if the sum of K most frequent array elements and the sum… Read More