If GCD of the sequence is K
if ( GCDArr ( ans ) == k ) { System . out . print ( " [ " ) ; int m = ans . size ( ) ; for ( int j = 0 ; j < m - 1 ; j ++ ) System . out . print ( ans . get ( j ) + " , ▁ " ) ; System . out . print ( ans . get ( m - 1 ) + " ] " ) ; return true ; }