You are viewing a single comment's thread. Return to all comments →
int utopianTree(int n) { if (n % 2 == 0) { return pow(2, n/2 + 1) - 1; } else { return pow(2, (n+3)/2) - 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 →