3 ms·
My old manager used this question in interviews and said he only once got what he considered the 'right' answer , and I know what he was looking for. He'd ask
by chairmanmow 8y ago
My old manager used this question in interviews and said he only once got what he considered the 'right' answer , and I know what he was looking for. He'd ask 'suppose you had unlimited resources and unlimited budget to figure out if a number was part of fibonacci sequence.'
Most people would hear fibonacci and get into some recursive programming technique - that was not the right answer. The right answer was since you had unlimited resources, etc, was just to store all the fibonacci numbers in a hash table or what not and perform a lookup to see if it existed. Answer was much simpler than what it appeared on its surface, though I'm not sure why you'd want to do it that way.
Not sure what that question really establishes about a programmer, to me it seems like the hypothetical invites the answer "I'd hire the best firm available to do it for me", but that doesn't seem correct either. Anyways, when those questions come up it seems like they want an algorithm, but in the case I cited, it was a trick. Not sure of any other examples to draw on though - curious if anyone has other examples.