Create 3 sum

Need to avoid duplicates. consider basic case, 0 0 0 0, for every index need to consider if it is the same as previous value;