You are viewing a single comment's thread. Return to all comments →
Go Golang Solution
func utopianTree(n int32) int32 { height := int32(1) if n == 0 { return height } for i := 1;i <= int(n);i++ { if i % 2 == 0 { height++ } else { height *= 2 } } 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 →
Go Golang Solution