My LeetCode grinding. Trying to do a problem a day.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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