You are viewing a single comment's thread. Return to all comments →
def utopianTree(n): k = n // 2 return ((n % 2) + 1) * (2 ** (k + 1) - 1)
Clean python solution
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 →
Clean python solution