## Count sub-arrays whose product is divisible by k

Given an integer K and an array arr[], the task is to count all the sub-arrays whose product is divisible by K. Examples: Input: arr[]… Read More »

- Check whether an Array is Subarray of another Array
- Generating subarrays using recursion
- Length of the longest Subarray with only Even Elements
- Sum of minimum elements of all subarrays
- Longest Subarray with Sum greater than Equal to Zero
- Length of the longest alternating subarray
- Subarray of size k with given sum
- Check if array can be divided into two sub-arrays such that their absolute difference is K
- Find the sums for which an array can be divided into sub-arrays of equal sum
- Count pairs in array whose sum is divisible by K
- Maximum length of the sub-array whose first and last elements are same
- Length of largest sub-array having primes strictly greater than non-primes
- Smallest Integer to be inserted to have equal sums
- Find the longest Fibonacci-like subarray of the given array
- Smallest subarray such that all elements are greater than K
- Count subarrays with all elements greater than K
- Count subarrays with Prime sum
- Maximum sum subarray such that start and end values are same
- Check if subarray with given product exists in an array
- Longest subarray with elements divisible by k
- Maximize the number of subarrays with XOR as zero
- Number of sub-arrays that have at least one duplicate
- Maximum average of a subarray of size of atleast X and atmost Y
- Longest Prime Subarray after removing one element
- Largest sub-array whose all elements are perfect squares
- Maximize the maximum among minimum of K consecutive sub-arrays
- Count sub-arrays whose product is divisible by k
- Sum of minimum element of all subarrays of a sorted array
- Count Subarrays with Consecutive elements differing by 1
- Longest subarray having difference in the count of 1's and 0's equal to k

Given an integer K and an array arr[], the task is to count all the sub-arrays whose product is divisible by K. Examples: Input: arr[]… Read More »

Given an array of integers, the task is to find the AND of all elements of each subset of the array and print the minimum… Read More »

Given an array A[] and positive integer K, the task is to count total number of pairs in the array whose sum is divisible by… Read More »

Given an array arr[] of integer elements, the task is to find the length of the longest sub-array whose product is 0. Examples: Input: arr[]… Read More »

Given an array arr[] and two integers X and Y. The task is to find a sub-array of size of atleast X and atmost Y… Read More »

Given an array arr[] of N positive integers, the task is to find the minimum LCM and GCD between elements of all possible sub-array. Examples:… Read More »

Given a sorted array A of n integers. The task is to find the sum of minimum of all possible subarrays of A. Examples: Input:… Read More »

Given a character array arr[] containing only lowercase English alphabets, the task is to print the maximum length of the subarray such that the first… Read More »

Given an integer K and an array arr[], the task is to split the array arr[] into K consecutive subarrays to find the maximum possible… Read More »

Given an array of N elements, the task is to find the longest subarray which is Fibonacci-like. A Fibonacci-like sub-array is defined as an array… Read More »

Given an array of N including positive and negative numbers only. The task is to find the length of the longest alternating (means negative-positive-negative or… Read More »

Given an array arr[] of integers. The task is to return the length of the maximum size sub-array such that either one of the condition… Read More »

Given an array arr[] and an integer K, the task is to find whether the array can be divided into two sub-arrays such that the… Read More »

Given an array of integers arr[], the task is to find all the values for sum such that for a value sum[i] the array can… Read More »

Given an array arr[] of N integers. The task is to count the total number of subarrays of the given array such that difference between… Read More »