Skip to content

Tag Archives: Hash

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
Kotlin HashMap is a collection which contains pairs of object. Kotlin Hash Table based implementation of the MutableMap interface. It stores the data in the… Read More
Given an unsorted array arr[] of size n, the task is to find the minimum difference between any pair in the given array.  Input: arr[]… Read More
Given a string S of length N consisting of lower-case English alphabets and an integer ‘l’, find the number of distinct substrings of length ‘l’… Read More
Given two strings A, B and some queries consisting of an integer i, the task is to check whether the sub-string of A starting from… Read More
Given two binary strings s and t. The task is to rearrange the string s in such a way that the occurrence of string t… Read More
Given a linked list, the task is to find the sum of all the odd frequency nodes from the given linked list.Examples:   Input: 8 ->… Read More
Given an array arr[] of N integers where |arr[i] ≤ 1000| for all valid i. The task is to count the pairs of integers from… Read More

Start Your Coding Journey Now!