one line javascript codes


  • 0
    C
    /**
     * @param {number} n
     * @return {number}
     */
    var arrangeCoins = function(n) {
        return Math.floor(Math.sqrt(2*n+0.25)-0.5);
    };
    

Log in to reply
 

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