You are viewing a single comment's thread. Return to all comments →
function utopianTree(n) { var height = 1 var double_hight_growth = true for (var i = 1; i <=n ;i++){ if (double_hight_growth){ double_hight_growth = false height = 2 * height } else{ double_hight_growth = true height = height + 1 } } return height }
Seems like cookies are disabled on this browser, please enable them to open this website
Utopian Tree
You are viewing a single comment's thread. Return to all comments →