## Find the longest Fibonacci-like subarray of the given array

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 »

- Maximum subsequence sum such that all elements are K distance apart
- Count of triplets that satisfy the given equation
- Find subarray with given sum with negatives allowed in constant space
- Divide an array into K subarray with the given condition
- Number of Subarrays with positive product
- Number of sub arrays with negative product
- Maximum length sub-array which satisfies the given conditions
- Number of triplets in array having subarray xor equal
- Find number of subarrays with XOR value a power of 2
- Maximum sum after K consecutive deletions

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 »

Given an array of N positive numbers, the task is to find a contiguous subarray (L-R) such that a[L]=a[R] and sum of a[L] + a[L+1]… Read More »

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 »