r/programming • • May 08 '15

Five programming problems every Software Engineer should be able to solve in less than 1 hour

https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k Upvotes

2.1k comments sorted by

View all comments

Show parent comments

0

u/[deleted] May 08 '15

[deleted]

11

u/creepy_doll May 08 '15

Based on the descriptions of the other problems I doubt that the provided list would be so large as to cause issues with a naive recursive function

-1

u/rocky_whoof May 08 '15

Why guessing?

A naive approach calculates that entire binary tree. If its height is a hundred then it has 2101 nodes. I'd be wary of any programmer that even attepts this without realizing this is unfeasible no matter what hardware you have.

Realistically the computer will run out of memory way sooner and that limit is harder to asses, but nonetheless, even if you had infinite O(1) access memory, 2100 calculations is out of the question.

1

u/creepy_doll May 08 '15

Will you people damn well read the following responses.

I assumed he was referring to the question that explicitly referred to recursion

Even reading one comment thread beyond would have made that apparent.

→ More replies (4)