## Find array such that no subarray has xor zero or Y

Given two integers X (1 ≤ X ≤ 15) and Y. The task is to find an array of the maximum possible length N such… Read More »

- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Count pairs in array whose sum is divisible by K
- Length of the longest alternating subarray
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Maximum sum of non-overlapping subarrays of length atmost K
- Maximum length of subarray such that sum of the subarray is even
- Maximum Sum SubArray using Divide and Conquer | Set 2
- Maximum length of the sub-array whose first and last elements are same
- Greatest contiguous sub-array of size K
- Find a subarray whose sum is divisible by size of the array
- Count sub-arrays whose product is divisible by k
- Find the longest Fibonacci-like subarray of the given array
- Split the given array into K sub-arrays such that maximum sum of all sub arrays is minimum
- Range Queries to Find number of sub-arrays with a given xor
- Maximum Subarray Sum after inverting at most two elements
- Maximum average of a subarray of size of atleast X and atmost Y
- Find the number of sub arrays in the permutation of first N natural numbers such that their median is M
- Sum of minimum element of all subarrays of a sorted array
- Maximize the subarray sum after multiplying all elements of any subarray with X
- Minimum LCM and GCD possible among all possible sub-arrays
- Maximize the maximum among minimum of K consecutive sub-arrays
- Sum of XOR of all sub-arrays of length K
- Maximize the maximum subarray sum after removing atmost one element
- Number of ways to divide an array into K equal sum sub-arrays
- Maximum size of sub-array that satisfies the given condition
- Find minimum length sub-array which has given sub-sequence in it
- Count the number of non-increasing subarrays
- Maximize the size of array by deleting exactly k sub-arrays to make array prime
- Count the number of sub-arrays such that the average of elements present in the sub-array is greater than that not present in the sub-array
- Bitwise AND of sub-array closest to K

Given two integers X (1 ≤ X ≤ 15) and Y. The task is to find an array of the maximum possible length N such… Read More »

Given a binary array arr[], the task is to find the length of the longest sub-array of the given array such that if the sub-array… Read More »

Given an array arr[] of N non-negative integers. The task is to find the length of the longest sub-array such that XOR of all the… Read More »

Given an array arr[] of integers and an integer K, the task is to find the greatest contiguous sub-array of size K. Sub-array X is… Read More »

Given an array arr[] of N elements, the task is to find the length of the smallest sub-array which has sequence {0, 1, 2, 3,… Read More »

Given an array of alphanumeric characters. The task is to find the longest contiguous sub-array which has equal numbers of letters (alphabets) and numbers (numeric… Read More »

Given an array arr[] of length N. The task is to check if there exists any subarray whose sum is a multiple of N. If… Read More »

Given an Array[] of N elements and a number K. ( 1 <= K <= N ) . Split the given array into K sub… Read More »

Given an integer array ‘arr’ of length N and an integer ‘k’, select some non-overlapping subarrays such that each sub-array if of length at most… Read More »

Given an array of n-elements find the longest sub-array with the greatest arithmetic mean. The length of the sub-array must be greater than 1 and… Read More »

Given binary array. The task is to find the length of subarray with minimum number of 1s. Note: It is guaranteed that there is atleast… Read More »

Given an array of length n ( n > k), we have to find the sum of xor of all the elements of the sub-arrays… Read More »

Given an integer array arr[] of length N and an integer K, the task is to select some non-overlapping sub-arrays such that each sub-array is… Read More »

Given an integer K and an array arr[] of N integers, the task is to find the number of ways to split the array into… Read More »

Given an array arr[] of N integers and an integer X, the task is to find the maximum possible sub-array sum after applying at most… Read More »