# Category Archives: Hash

Given a string S of lowercase English characters, find out whether the number of the letters whose frequencies in the string have the same parity as their positions in the… Read More
Hashing refers to the process of generating a fixed-size output from an input of variable size using the mathematical formulas known as hash functions. This… Read More
Given two snapshots S1 and S2 of N elements, the task is to find the elements which are changing their groups and the ones that… Read More
Introduction : Imagine a giant library where every book is stored in a specific shelf, but instead of searching through endless rows of shelves, you… Read More
Given three integers N, X, Y, and an array arr[] of size N, the task is to find the count of subarrays having at least… Read More
Geek is a big fan of the Soccer League. Recently he has got a document containing the scores of all the matches played in the… Read More
Given an empty array A[] & Q queries of two types 1 and 2 represented by queries1 and queries2 respectively, the task is to find… Read More
Given a 3D array of size N*M*P consisting only of English alphabet characters, the task is to print the frequency of all the elements in… Read More
Given an array arr[], integer M and an array query[] containing Q queries, the task is to find the query[i]th occurrence of Mth most frequent… Read More
Given string str of size N and two integers M and K (N is divisible by M), the task is to find the Kth non-overlapping… Read More
Given two strings str1 and str2, the task is to check if the two strings are isomorphic to each other. Two strings str1 and str2… Read More
Given an array arr[] of integers N, the task is to find the GCD of all numbers for which it’s value is equal to its… Read More
Given an integer array arr[] and a positive integer K, the task is to count all distinct pairs with differences equal to K. Examples: Input:… Read More
Given an array arr[] of size N and an integer K, the task is to minimize the value of the maximum element of the array… Read More
Given an array arr[] of size N, the task is to check if the array elements can be rearranged in a way such that the… Read More