Category Archives: Data Structures

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 »

Grid and alphabets

Amanada, a school kid, is learning English alphabets. Her teacher devised a small game to make the task fun. A grid of ‘m’ rows and ‘n’ columns is filled with English alphabets. She needs to search English words in this grid by moving one step at a time in any of the adjacent grid cells. A grid of… Read More »