Run three nested loops each loop for each element of triplet
for ( int i = 0 ; i < arr . Count ; i ++ ) { for ( int j = i + 1 ; j < arr . Count ; j ++ ) { for ( int k = j + 1 ; k < arr . Count ; k ++ ) {