• + 8 comments

    Since we are guaranteed that each number is unique, we can use a structure with constant-time contains() and solve the problem in linear time, am I wrong? At least my solution passed all test cases.