You are viewing a single comment's thread. Return to all comments →
def utopianTree(n): h = 1 for i in range(n//2): h = h*2+1
return h if n% 2==0 else h*2
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 →
def utopianTree(n): h = 1 for i in range(n//2): h = h*2+1