Pre - compute smallest divisor of all numbers
SieveOfEratosthenes ( ) ; int arr [ ] = { 10 , 15 , 7 , 25 , 9 , 35 } ; int size = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; cout << largestGCDSubsequence ( arr , size ) ; return 0 ; }