ProDeveloperTutorialonAugust 31, 2026 Sliding Window: Given an array and size k, find the first negative integer in each window of size k Problem Statement: You are given an array and a integer K. You need to find the first -ve integer for each window of size k. return 0, if…
ProDeveloperTutorialonAugust 31, 2026 Sliding Window: Given an array and integer k, find the max sum of distinct subarray of length k Problem Statement: You are given an array with repeated integers and a number k. You need to find the maximum sum of all the sub array wit…
ProDeveloperTutorialonAugust 31, 2026 Sliding Window: Given a string, get the number of substrings having ‘a’, ‘b’, ‘c’ Problem Statement: Given a string, get the number of substrings having ‘a’, ‘b’, ‘c’ Example: Input: str =…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given an array, return the count of smallest subarray to be removed to make the remaining array sorted Problem Statement: Given an array, return the count of smallest subarray to be removed to make the remaining array sorted Example: Input: arr…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Celebrity Problem Problem Statement: You are given 2D matrix, where in arr[i][j] is 1 if person i knows person j. Else it will be 0. You need to find the…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given a array and a value k, return the number of subarray whose product is less that k Problem Statement: Given a array and a value k, return the number of subarray whose product is less that k Example: Input: nums = [1, 2, 3, 4,…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given an array and a value K, you need to return the size of minimum subarray that is equal to k Problem Statement: Given an array and a value K, you need to return the size of minimum subarray that is equal to k Example: Input: arr = [1,…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given two arrays with duplicate, you need to return the union of two arrays Problem Statement: Given two sorted arrays with duplicate, you need to return the union of two arrays Union of two arrays will have all the…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given two arrays find the intersection of two arrays Problem Statement: You are given two arrays. You need to return the intersection of the two arrays and you need to add the duplicate numbers…
ProDeveloperTutorialonAugust 31, 2026 Two Pointers: Given an array and a value k, return the count of pairs with k difference Problem Statement: Given an array and a value k, return the count of pairs with k difference Example: Input: arr = [1, 2, 3, 4] k = 1 Output:…