News for hackers. Stuff that matters.
Re:The best engineering interview question I've ever gotten by xarope on Sunday April 17, 2022 @11:17PM (#31066975)
I hate to say this, but I would have failed the type 2's as well, in just copying and pasting and changing pluses to multiplies.

assuming signed int16 (for simplicity of discussion), 32767 + 1 is far easier to error handle (a simple check of the max_int value) than 10000 * 4, unless you are just blindly allowing the range of values and don't care about overflow/underflow.

There are no comments on this comment yet.