目录
题目
Given an array of integers, every element appears twice except for one. Find that single one.
解决方案
1 | import java.util.Hashtable; |
注意事项
- 遍历数组,以数字元素为key,出现次数为value,构造Hashset,找出value为1的key即可。
Given an array of integers, every element appears twice except for one. Find that single one.
1 | import java.util.Hashtable; |