## 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 »

- Optimal Strategy for a Game | Set 2
- 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
- Find k closest numbers in an unsorted array
- Building Heap from Array
- Amazon Internship Interview Experience
- Check if given Preorder, Inorder and Postorder traversals are of same tree | Set 2
- Maximum sum such that no two elements are adjacent | Set 2
- Longest subsequence such that adjacent elements have at least one common digit
- Sort an array without changing position of negative numbers
- Create linked list from a given array
- Maximum element in a sorted and rotated array
- Given two arrays count all pairs whose sum is an odd number
- Find maximum xor of k elements in an array
- Partition an array of non-negative integers into two subsets such that average of both the subsets is equal
- Maximum absolute difference in an array
- Find the longest string that can be made up of other strings from the array
- Program to check if an Array is Palindrome or not
- Find minimum difference between any two elements | Set 2
- Remove minimum elements from either side such that 2*min becomes more than max | Set 2
- Kth smallest element in a subarray
- Count the triplets such that A[i] < B[j] < C[k]
- Introduction to Data Structures | 10 most commonly used Data Structures
- Number of subsets with zero sum
- Count of integers of length N and value less than K such that they contain digits only from the given set
- Maximum sum combination from two arrays
- Find m-th smallest value in k sorted arrays
- Minimum cost to reach end of array array when a maximum jump of K index is allowed
- Find the minimum number of operations required to make all array elements equal
- Maximum Sum Subsequence of length k

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 elements and Q queries, where each query contains an integer K. For each query, the task is to find the… Read More »

Given an array consisting of even number of elements, the task is to divide the array into M group of elements (every group must contain… Read More »

Giving k sorted arrays, each of size N, the task is to merge them into a single sorted array. Examples: Input : arr[][] = {{5,… Read More »

Given an array arr[], the task is to find the maximum length of a subsequence such that the adjacent elements in the subsequence have a… Read More »

Given an array of N distinct integers, the task is to find the number of pairs (x, y) such that x < y. Example: Input:… Read More »

Given N numbers(N is an even number). Divide the N numbers into N/2 pairs in such a way that the sum of squares of the… 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 N integers and an integer S. The task is to find an element K in the array such that if… Read More »

There are N distinct integers arranged on a circle. The distance between any two adjacent numbers is 1. The task is to travel on this… Read More »

Given an array of N integers. The task is to eliminate the minimum number of elements such that in the resulting array the sum of… Read More »

Given N points in 2 dimensional plane. A point is said to be above another point if the X coordinates of both points are same… Read More »

Given an array a[] consisting only 0 and 1. The task is to check if it is possible to transform the array such that the… Read More »

Given an array arr[] of N integers and an integer cost, the task is to calculate the cost of making all the elements of the… Read More »

Given an array arr[], the task is to print the count of unique pairs (arr[i], arr[j]) such that i < j. Examples: Input: arr[] =… Read More »