You are viewing a single comment's thread. Return to all comments →
Javascript easy to understand
function utopianTree(n) { let height = 1; for(let i=1; i <= n; i++){ if(i%2 == 0){ height++; } else height = height * 2; } return height }
Utopian Tree
You are viewing a single comment's thread. Return to all comments →
Javascript easy to understand