3 ms·
I’m 10 years in software and was never bothered to remember how to implement it the efficient way and I know many programmers who don’t know even the inefficien
by iddan 2y ago
I’m 10 years in software and was never bothered to remember how to implement it the efficient way and I know many programmers who don’t know even the inefficient way but kick ass.
I once got that question in an interview for a small startup and told the interviewer: with all due respect what does that have to do with the job I’m going to do and we moved on to the next question (still passed).
- dijksterhuis 2y agoi’m around 10 years as well and i can’t even remember how the fibonacci sequence progress off hand. I’d have to wikipedia it to even get started.
- lupusreal 2y agoThere's nothing wrong with that. But once the interviewer tells you that the next number is the sum of the previous two, starting with 0 and 1, any programmer with a pulse should be good to go.
- sarchertech 2y agoYou don’t need to memorize how to compute a Fibonacci number. If you are a barely competent programmer, you should be capable of figuring it out once someone tells you the definition. If someone tells you not to do it recursively, you should be able to figure that out too. Interview nerves might get in your way, but it’s not a trick question you need to memorize.
- JaumeGreen 2y agoBut I'm sure there would be some people that given the following question would not be able to produce any code by themselves: "Let's implement a function to return us the Nth fibonnaci number.To get a fib (fibonacci) number you add the two previous numbers, so fib(N)=fib(N-1)+fib(N+2). The starting points are fib(0)=1 and fib(1)=1. Let's assume the N is never too big (no bigger than 20)." And that's a problem if they can't solve it. OTOH about 15 years ago I heard from a friend that interviewed candidates that some people couldn't even count all the instances of 'a' in a string. So in fact not much has changed, except that it's harder to spot these kind of people.