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

# Category Archives: Hash

Given an array arr[] consisting of N integers, the task for each array element is to find the absolute difference between the count of distinct… Read More

Given a string S of size N, the task is to find the maximum sum of values assigned to all the alphabets of the string… Read More

In Ball Sort Puzzle game, we have p balls of each colour and n different colours, for a total of p×n balls, arranged in n… Read More

Given a string S of N characters, the task is to calculate the total number of non-empty substrings such that at most one character occurs… Read More

Given a binary matrix mat[][] of dimensions N*M, the task is to find the number of corner rectangles that can be formed. A corner rectangle… Read More

Given an array of strings words[] and the sequential order of alphabets, the task is to sort the array according to the given order. Assume… Read More

Given an array arr[] of length N and Q queries of 3 types (1, 2, 3) whose operations are as follows: Type 1: query has… Read More

Given an array arr[] consisting of N pairs of the form {A, B}, the task is to count the pairs of indices (i, j) such… Read More

Given two Geometric Progressions (a1, r1) and (a2, r2) where (x, y) represents GP with initial term x and common ratio y and an integer… Read More

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