ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, you need to count the frequency if the array elements Problem Statement: You are given an array, you need to find the frequency of each distinct element. Example: Input: arr = [1, 2, 1, 2, 3, 4,…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, count all the subsets with even numbers and are distinct Problem Statement: You are given an array with repeated integers, you need to count all the subsets which has only even numbers and all are…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, you need to find the missing number Problem Statement: Given an array of size n in the range [0, n, you need to find the missing number. Example: Input: s = [0, 3, 1] Output: [2]…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array and a value k, return top k frequent elements Problem Statement: Given an array and a value k, return top k frequent elements. Example: Input: arr = [1, 2, 1, 2, 2, 2, 1], k = 2 Output:…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given 2 arrays, and a value x, you need to find the pairs sum equal to the given value of x. Problem Statement: You are given 2 sorted arrays and a value k. You need to find all pairs from both the array whose value is equal to x.…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, find the element that occurs odd number of times Problem Statement: Given an array, find the element that occurs odd number of times Example: Input: arr = [1, 1, 1, 2, 2, 3, 3] Output: 1…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, find the majority element Problem Statement: You are given an array of repeated numbers. You need to return all the numbers that repeats [n/3] times Example: Input: arr…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given an array, find the first missing positive number Problem Statement: You are given an array, you need to return the first smallest positive integer. You need to do it in O(n) and O(1) space.…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Find the first repeating element and index in the array Problem Statement: You are given an array with repeated elements. You need to find the first repeating element. Example: Input: arr = [4, 3,…
ProDeveloperTutorialonAugust 28, 2026 Hashing: Given two arrays, sort first array according to the order of second array Problem Statement: You are given two arrays, you need to sort arr1 by the order of arr2. Example: Input: arr1 = [3, 2, 1, 1, 5] arr 2 = [1, 2,…