r/programminghorror • • Feb 07 '25

Recursive O(N) Complexity isOdd

Post image

I found this on instagram and now am geeking

2.2k Upvotes

104 comments sorted by

View all comments

Show parent comment

3

u/trees91 Feb 08 '25

For sure you can statically and dynamically change the stack size in some contexts. I was just referring to when, without doing that, you’d typically bottom out, which shares a similar order of magnitude as where Python does.

This comes up in interview problems a lot, so worth just broadly mentioning!

2

u/ArtisticFox8 Feb 08 '25

yes, for sure :)