Category Archives: Arrays

Length of largest subarray of Fibonacci Numbers

Given an array arr[] of integer elements, the task is to find the length of the largest sub-array of arr[] such that all the elements of the sub-array are Fibonacci numbers. Examples: Input: arr[] = { 4, 2, 3, 4, 5, 8, 11 } Output: 2 Explanation: Maximum length sub-array with all elements as Fibonacci number is {2,… Read More »