• + 4 comments

    Unfortunately, I think this is O(n^2). Not that it matters too much for a problem with 100 socks :)

    The issue is that set(socks) is of size O(n) and list.count() method's runtime is O(n)