• + 1 comment

    I don't know why you want to sort, nowhere it said to sort. it just asked to print the unique pair count which you get just by doing .size() on set.