Now consider all cases when first element forms a triplet and removed . Check for all possible triplets ( low , i , j )
for ( int i = low + 1 ; i <= high - 1 ; i ++ ) { for ( int j = i + 1 ; j <= high ; j ++ ) {