Function to checks if any permutation of the array exists whose sum of adjacent pairs is not divisible by 3
function factorsOf3 ( arr , N ) { let a = 0 , b = 0 , c = 0 ; for ( let i = 0 ; i < N ; i ++ ) {