My LeetCode grinding. Trying to do a problem a day.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

problem.txt 298B

123456789101112131415
  1. Given a non-empty array of integers, every element appears twice except for one. Find that single one.
  2. Note:
  3. Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
  4. Example 1:
  5. Input: [2,2,1]
  6. Output: 1
  7. Example 2:
  8. Input: [4,1,2,1,2]
  9. Output: 4