Single Number 2021-06-16 20:01

Problem Description

public int singleNumber(int[] nums) {
    int a = 0;
    for (int n : nums) {
        a = a ^ n;
    }
    return a;
}
Runtime Memory
1 ms 38.6 MB

henryxi leetcode list

EOF