Skip to content

Category Archives: Hash

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
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 of positive and negative numbers, find if there is a subarray (of size at-least one) with 0 sum. Examples :  Input: {4,… Read More
Given an array arr[], the task is to find the longest subarray whose sum is a prime number. Examples: Input:   arr[ ] = {1, 4,… 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
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 and a positive integer M, the task is to find the maximum frequency for each M length… 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

Start Your Coding Journey Now!