• Challenge Author
    + 1 comment

    Hi, you can refer to other people' submission if still stuck.

    BTW, you are using nub whose complexity is O(N2). I personally prefer map head. group. sort, which is of O(N logN).