# Tag Archives: HashTable

## Lexicographical smallest number after at most K consecutive swaps

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 »

## K most occurring strings

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 »

## Minimum distance between any most frequent and least frequent element of an array

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 »

## Check if frequency of each element in given array is unique or not

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 »

## Replace each element of Array with it’s corresponding rank

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 »

## First subarray with negative sum from the given Array

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 »

## Count quadruplets(A, B, C, D) till N such that sum of square of A and B is equal to that of C and D

Given a number N, the task is to find the number of quadraples such that a2 + b2 = c2 + d2 where (1 <=… Read More »

## Difference between Bloom filters and Hashtable

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 »

## Minimum cost to modify a string

Given a string str consisting of lower case alphabets only and an integer K. The task is to find the minimum cost to modify the… Read More »

## Hash Table vs STL Map

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 »

## Hashtable in Java

This class implements a hash table, which maps keys to values. Any non-null object can be used as a key or as a value. To… Read More »