javascript bit manipulation 85ms


  • 0
    B

    var findTheDifference = function(s, t) {
    let added = (s + t).split('').map(i => i.charCodeAt()).reduce((x, y)=> x^y);
    return String.fromCharCode(added)
    };


Log in to reply
 

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