Javascript 5 lines with inline comment

  • 0
    var getIntersectionNode = function(ah, bh) {
        var a=ah, b=bh
            a = a? : bh // move a to head of b if at end
            b = b? : ah // move b to head of a if at end      
        return a; // a === b either happen at the connecting point or when they are both null

Log in to reply

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