class Solution { public int singleNumber(int[] nums) { int result; for (int num : nums) { result ^= num; } return result; } }
最后更新于5年前
这有帮助吗?