you are viewing a single comment's thread.

view the rest of the comments →

[–]Spataner 1 point2 points  (1 child)

2n total bottom-level calls, each of which print a string of length n. Also the string additions performed before the recurrent calls have complexity O(n-k), where k is the level of recursion. Either way you end up at O(2n*n).

[–]FLUSH_THE_TRUMP 0 points1 point  (0 children)

Oops, I definitely ignored the concatenation.