You are viewing a single comment's thread. Return to all comments →
C# * int height = 0; if (n == 0) height = 1; else { for (int i = 1; i <= n; i++) { if (i % 2 == 0) height = height + 1; else height = height > 0 ? height * 2: i * 2;
}
} return height;
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 →
C# * int height = 0; if (n == 0) height = 1; else { for (int i = 1; i <= n; i++) { if (i % 2 == 0) height = height + 1; else height = height > 0 ? height * 2: i * 2;
} return height;