3 ms·
> I don't get how it's a real interview question considering that it requires hardly any thinking at all. It's not supposed to be the only question you give, b
by toast0 5y ago
> I don't get how it's a real interview question considering that it requires hardly any thinking at all.
It's not supposed to be the only question you give, but it (or similar) works well to exclude people who can't program at all; which is sometimes a scary portion of the candidates.
Most of the algorithm, complexity, and data structures questions end up testing if you studied the right things, rather than if you'd be good at the basics of the job --- which is usually translating a description of something someone wants into if-statements, and maybe a bit of math here and there, but not a whole lot, and maybe some nested loops.
Honestly, my interview question is setup to see if the person can take a problem, describe an output format/file that works with the problem, and then see if they can write something that looks like code that outputs what they said they were going to.
Enough candidates have trouble with a simple loop (or sometimes a two deep loop) or keeping to the format they specified that I don't need a hard problem to be very selective.