## Check whether an Array is Subarray of another Array

Given two arrays A[] and B[] consisting of and integers. The task is to check whether the array B[] is a subarray of the array… Read More »

- Check whether an Array is Subarray of another Array
- 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
- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Maximum length of the sub-array whose first and last elements are same
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Count sub-arrays whose product is divisible by k
- Find the longest Fibonacci-like subarray of the given array
- Smallest subarray such that all elements are greater than K
- Count subarrays with Prime sum
- 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
- Maximum sum subarray such that start and end values are same
- Sum of minimum element of all subarrays of a sorted array
- Range Queries to Find number of sub-arrays with a given xor
- Maximum Subarray Sum after inverting at most two elements
- Maximum length of subarray such that sum of the subarray is even
- Maximum Sum SubArray using Divide and Conquer | Set 2
- Maximize the maximum among minimum of K consecutive sub-arrays
- Largest sub-array whose all elements are perfect squares
- Minimum LCM and GCD possible among all possible sub-arrays
- Count Subarrays with Consecutive elements differing by 1
- Maximum size of sub-array that satisfies the given condition
- Find the count of Strictly decreasing Subarrays
- Count the number of non-increasing subarrays
- 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
- Maximize the subarray sum after multiplying all elements of any subarray with X
- Maximize the maximum subarray sum after removing atmost one element
- Minimum value among AND of elements of every subset of an array

Given two arrays A[] and B[] consisting of and integers. The task is to check whether the array B[] is a subarray of the array… Read More »

Given an array of integer elements, the task is to find the length of the largest sub-array of such that all the elements of the… Read More »

Given an array A[] of integers. The task is to count the total number of strictly decreasing subarrays( with size > 1 ). Examples: Input… Read More »

Given an array of N integers and a number K, the task is to find the length of the smallest subarray in which all the… Read More »

Given an array A[] of integers. The task is to count total subarrays whose sum is prime with ( size > 1 ). Examples: Input… Read More »

Given an array arr of n elements, the task is to find the number of the sub-arrays of the given array that contain at least… Read More »

Given an array of N integers and a number K, the task is to find the number of subarrays such that all elements are greater… Read More »

Given an array with n elements. The task is to find the maximum number of contiguous array elements which have the same number of set… Read More »

Suppose you a given an array. You have to find the length of the longest subarray such that each and every element of it is… Read More »

Given an array A of n integers. The task is to find the sum of minimum of all possible (contiguous) subarray of A. Examples: Input:… Read More »

Given a number N, the task is to check if the all sub-numbers of this number have distinct digit product. Note: An N digit number… Read More »

Given an array of N numbers. The task is to maximize the number of subarrays with XOR value zero by swapping the bits of array… Read More »

Given an array of positive integers, find the smallest non-negative integer (i.e. greater than or equal to zero) that can be placed between any two… Read More »

Given an array arr[]. The task is to find the length of the longest subarray of arr[] such that it contains only even elements. Examples:… Read More »

Given an array ‘arr’ of length ‘n’. The task is to find the largest contiguous sub-array having the count of prime numbers strictly greater than… Read More »