# Tag Archives: HashTable

Given an array arr[] and a number K, the task to find the maximum distance between two elements whose absolute difference is K. If it… Read More
Given an array arr[] of N elements. The task is to count the total number of indices (i, j) such that arr[i] = arr[j] and… Read More
Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string. Examples:  Input: str… Read More
Given an array arr[] consisting of a permutation of integers [1, N], derived by rearranging the sorted order [1, N], the task is to find… Read More
Given a number in form of string str and an integer K, the task is to find the smallest integer that can be formed after… 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 an integer array arr[] of size N, the task is to find the minimum distance between any most and least frequent element of the… Read More
Given an array arr[] of N positive integers where the integers are in the range from 1 to N, the task is to check whether… 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 an array arr[] consisting of N integers, the task is to find the start and end indices of the first subarray with a Negative… Read More
Given a number N, the task is to find the number of quadruples such that a2 + b2 = c2 + d2 where (1 <=… Read More
HashTable: Hashtable is designed to use a special function called the Hash function which is used to map a given value with a particular key for… Read More
Given 2 arrays A[] and B[] and an integer M. The task is to find the minimum value of X such that after changing all… Read More
Given string str consisting of lower case alphabets only and an integer K. The task is to find the minimum cost to modify the string… Read More
This article focus on : Compare and contrast Hash table and an STL Map. How is the hash table implemented? If the number of inputs… Read More