Selecting the triplets such that all array elements can be made equal to arr [ N - 1 ]
for ( int i = 0 ; i < N - 3 ; i += 2 ) { System . out . println ( i + " ▁ " + ( i + 1 ) + " ▁ " + ( N - 1 ) ) ; } } else {