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