Skip to content

Category Archives: Hash

Given an array arr[] of length N and a positive integer k, the task is to find the minimum length of the subarray that needs… Read More
Given a string s and a positive integer K, the task is to find the length of the longest contiguous substring that appears at least… Read More
What is Hash Table? A Hash table is defined as a data structure used to insert, look up, and remove key-value pairs quickly. It operates… Read More
Given two strings str1 and str2, and a third-string shuffle, determine if shuffle is a valid shuffle of str1 and str2, where a valid shuffle… Read More
Design a HashMap without using any built-in hash table libraries. To be specific, your design should include these functions: put(key, value): Insert a (key, value)… Read More
Given an array arr[] of size n, where each element in the array represents a value between 1 and n. Additionally, you are given another… Read More
Given a string S and an integer K. You can choose any character from S and replace all occurrences of that character in S with… Read More
A rolling hash is a hash function that is used to efficiently compute a hash value for a sliding window of data. It is commonly… Read More
A hash table is a data structure that allows for quick insertion, deletion, and retrieval of data. It works by using a hash function to… Read More
Given an array arr[] of positive integers, the task is to find the count of all triplets such that XOR of two equals the third… Read More
Dynamic Segment Trees with Poly Hash Tables is a data structure that combines the benefits of both dynamic segment trees and hash tables to efficiently… Read More
Hashing is defined as a data distribution technique that transforms given key into a different value using hash function for faster access to data. Characteristics… Read More
A hash function is a mathematical function that takes input data (also known as the message or pre-image) and produces a fixed-length output called a… Read More
Given a Binary Search Tree, find the mode of the tree. Note: Mode is the value of the node which has the highest frequency in… Read More
Load balancing refers to the process of distributing workloads evenly across multiple servers, nodes, or other resources to ensure optimal resource utilization, maximize output, minimize… Read More