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