# Category Archives: Hash

Given an array arr[] consisting of N positive integers, the task is to find the nearest perfect power of 2 of the nearest perfect squaresâ€¦ Read More
Given a string S representing a sequence of moves(L, R, U, and D) and two integers X and Y representing the starting coordinates, the taskâ€¦ Read More
Given an array arr[] consisting of N positive integers, the task is to find the sum of all array elements having a distinct count ofâ€¦ Read More
Given a string S consisting of lowercase English alphabets, the task is to find the length of the longest subsequence from the given string suchâ€¦ Read More
Given a matrix mat[][] of dimensions N * M, and an integer K, the task is to find the maximum sum of any rectangle possibleâ€¦ Read More
Given an array arr[] of N integers, the task for each array element is to find the number of ways of choosing a pair ofâ€¦ Read More
Given an array arr[] of size N, the task is to find the minimum number of array elements required to be removed such that theâ€¦ Read More
Given an array arr[] consisting of 2*N integers, the task is to check if it is possible to rearrange the array elements such that arr[2â€¦ Read More
Given an array arr[] consisting of N positive integers, replace pairs of array elements whose Bitwise AND exceeds Bitwise XOR values by their Bitwise ANDâ€¦ Read More
Given an array of strings arr[] consisting of N strings, the task is to categorize the strings according to the hash value obtained by addingâ€¦ Read More
Given two strings S1 and S2 of lengths M and N respectively, the task is to calculate the sum of the frequencies of the charactersâ€¦ Read More
Given an array arr[] of size N, and an integer K representing a digit, the task is to print the given array in increasing orderâ€¦ Read More
Given an array arr[] consisting of N positive integers, the task is to find the minimum count of divisions(integer division) of array elements by 2â€¦ Read More
Given a string S of length N and two integers M and K, the task is to count the number of substrings of length Mâ€¦ Read More
Given a matrix A[][] of size N*M and a 2D array Q[][] consisting of queries of the form {X, K}, the task for each queryâ€¦ Read More