class Solution { public int singleNumber(int[] nums) { int result = 0; for (int i = 0; i< nums.length; ++ i) { result ^= nums[i]; } return result; } }
LeetCode - 136. 只出现一次的数字
猜你喜欢
转载自blog.51cto.com/tianyiya/2174662
今日推荐
周排行