Skip to content

Tag Archives: Hash

Given an array of items, an ith index element denotes the item id’s, and given a number m, the task is to remove m elements… Read More
Hash Function A Hash function is a function that maps any kind of data of arbitrary size to fixed-size values. The values returned by the… Read More
Given an initial array, A[] and a final array B[] both of size N containing integers from the range [1, N], where A[] represent the… Read More
Given an array arr[] of N strings and an integer K, the task is to print K strings which occurred the most number of times… Read More
Given a string, the task is to write Java program to print all the duplicate characters with their frequency Example:  Input: str = “geeksforgeeks” Output:… Read More
Given an array arr[] of N integers, the task is to replace each element of Array with their rank in array. The rank of an… Read More
Given a string str and an integer K, the task is to find the length of the longest sub-string S such that every character in… Read More
Given an integer array arr[] consisting of N integers, the task is to find the nearest Prime Number in the array for every element in… Read More
Given an array arr[] of N integers and a number K. The task is to count the number of subarray with exactly K Prime Numbers.Example:  … Read More
Given a string P consisting of small English letters and a string Q consisting of weight of all characters of English alphabet such that for… Read More
Given string str of size N, the task is to remove all the characters from the string that have odd frequencies. Examples:  Input: str =… Read More
Hashing is a data structure that is used to store a large amount of data, which can be accessed in O(1) time by operations such… Read More
Given a permutation of integers from 1 to N and an integer M, the task is to check if any subarray of the given permutation… Read More
Given a grid of size H*W with all cells initially white. Given N pairs (i, j) in an array, for each pair, paint cell (i,… Read More
Given an array A[] and positive integer K, the task is to count the total number of pairs in the array whose sum is divisible… Read More

Start Your Coding Journey Now!