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