2 ms·
It’s not a trick question. It’s just writing a loop any CS graduate or equivalent autodidact should have absolutely no problem with. We didn’t require any spec
by User23 8y ago
It’s not a trick question. It’s just writing a loop any CS graduate or equivalent autodidact should have absolutely no problem with.
We didn’t require any specific time or space complexity. If the candidate whipped out a suboptimal solution quickly and correctly and time permitted we might ask them about that though and how it might be improved. The purpose of the question is not to see if the candidate has memorized the answer or sees a trick, it’s so they can demonstrate basic proficiency and systematic reasoning.