public class Solution {
public int singleNumber(int[] nums) {
int ans = 0;
for (int i = 0; i < nums.length; i++) {
ans ^= nums[i];
}
return ans;
}
}
LeetCode 136. Single Number
最新推荐文章于 2022-02-24 16:03:24 发布