Maximum GCD of all subarrays of length at least 2
Given an array arr[] of N numbers. The task is to find the maximum GCD of all subarrays of size greater than 1. Examples: Input: arr[] = { 3, 18, 9, 9, 5, 15, 8, 7, 6, 9 } Output: 9 Explanation: GCD of the subarray {18, 9, 9} is maximum which is 9.Input: arr[] = { 4, 8, 12, 16, 20, 24 } Output: 4 Ex