leetcode #136 Single Number

136 Single Number
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
数组中,题目给定了一定至少存在一个数,所以不考虑特殊输入的情况
成对出现的数,要考虑使用^
操作
1 | class Solution { |