Loop through array to find maximum GCD of subarray with size 2
for i in range ( 1 , n ) : NEW_LINE INDENT k = max ( k , gcd ( arr [ i ] , arr [ i - 1 ] ) ) NEW_LINE DEDENT cnt = 0 NEW_LINE maxLength = 0 NEW_LINE