Count Triplet Sum Permutations Amazon. It first sorts the input list in ascending order, and then iterates