Javascript Solution


  • 0

    Javascript Solution / 102ms Runtime

    var singleNumber = function(nums) {
        var result = nums[0];
        for(var i = 1; i < nums.length; i++) {
            result = result^nums[i];
        }
        return result;
    };
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.