Tag Archives: HashSet

Given an array arr[] of length n which contains positive integers (0 â‰¤ arr[i] â‰¤ 109), the task is to count the number of elementsâ€¦ Read More
Given the array X[],   the task is to return the maximum suffix sub-array length of the same elements for each distinct element and theâ€¦ Read More
Given a permutation A[] of first N integers (i.e. array contains integers from 1 to N exactly once) and an integer K, the task isâ€¦ Read More
Hashing refers to the process of generating a fixed-size output from an input of variable size using the mathematical formulas known as hash functions. Thisâ€¦ Read More
Given an array A[] of N non-negative integers and an integer K. Each time, you can do the following two operations Find Average of MAX andâ€¦ Read More
Given a graph root, and a value K, the task is to find the number of nodes in the graph whose sum of neighbors isâ€¦ Read More
Given two arrays A[] and B[] of length N and M respectively, the task is to find the minimum number of insertions and deletions onâ€¦ Read More
Given 3 arrays, arr[], brr[], and crr[], the task is to find the common elements in at least 2 arrays out of the given 3â€¦ Read More
Given two strings str1 and str2, the task is to find the minimum number of prefixes and suffixes of str2 required to form the stringâ€¦ Read More
Given an array arr[] consisting of N integers, the task for each array element is to find the absolute difference between the count of distinctâ€¦ Read More
Given a queue consisting of the first N natural numbers and queries Query[][] of the type {E, X}, the task is to perform the givenâ€¦ Read More
Given an array of pairs arr[][] of the form {X, Y} such that each arr[i] represents the time X at which the candidate with candidateâ€¦ Read More
Given two arrays A[] and B[] consisting of N integers where A[i] represents the initial position of the ith plane and B[i] is the speedâ€¦ Read More
Given an array arr[] consisting of N distinct positive integers and a range [L, R], the task is to find the element in the givenâ€¦ Read More
Given an array arr[] consisting of N positive integers, the task is to find the number of pairs such that the Greatest Common Divisor(GCD) ofâ€¦ Read More