• + 0 comments

    using JS: let currHeight = 1; for(let i = 1; i <= n; i++) { currHeight += (i%2 == 0)? 1:currHeight; } ** return currHeight; **