4 ms·
The question isn't really about finding duplicates in a list, but a slightly backhanded way to ask "do you remember high school math and can you apply it". A le
by oriolid 4y ago
The question isn't really about finding duplicates in a list, but a slightly backhanded way to ask "do you remember high school math and can you apply it". A less artificial problem would just make things more complicated.
Also, your way is O(n) memory when O(1) would be enough for the original question.