Skip to content

Tag Archives: HashTable

The task is to design a general Hash Table data structure with Collision case handled and that supports the Insert(), Find(), and Delete() functions. Examples:… Read More
Given an array arr[] consisting of N integers, the task is to split the array into the minimum number of disjoint groups, such that differences… Read More
Given an array arr[] consisting of N integers, the task is to partition the array into two subsets such that the count of unique elements… Read More
Given a Binary Tree consisting of N nodes, the task is to find the maximum width of the given tree where the maximum width is… Read More
Given two arrays W[] and L[] consisting of N positive integers, where W[i] is initially located at position i on an infinite number line. In… Read More
Given a sorted array arr[] consisting of N positive integers and an integer D, the task is to find the number of triplets (i, j,… Read More
Given an array arr[] consisting of N integers and an integer K, the task is to print all possible unique quadruplets (arr[i], arr[j], arr[k], arr[l])… Read More
Given string S consists of lowercase and uppercase letters, the task is to find the number of substrings having an equal number of lowercase and… Read More
Given two positive integers A, B, and an array D[] consisting only of digits [0-9], the task is to check if it is possible to… Read More
Given a string S consisting of N characters and a positive integer K, the task is to count the number of substrings having at least… Read More
Given a Directed Tree consisting of N nodes, the task is to check if there exists a node in the given tree such that all… Read More
Given an array arr[] consisting of N integers and a positive integer M, the task is to find the number of array elements that occur… Read More
Given an array arr[] consisting of N integers and a positive integer K, the task is to count the number of subarrays having exactly K… Read More
Given a positive integer N, the task is to print the nearest power of 2 of the frequencies of each digit present in N. If… Read More
Given an array arr[] consisting of N positive integers, the task is to find the nearest perfect power of 2 of the nearest perfect squares… Read More