arrangeCoins = function(n) {
    
    let steps = 1;
    let canBuild = 0;

    while(n >= steps) {
        n = n - steps;
        canBuild++;
        steps++;
    }

    return canBuild || 1;
}
https://leetcode.com/problems/arranging-coins/
Linear time
Time O(n) | Space O(1)
@param {number} n
@return {number}