Re:Thank goodness we hired someone who can reverse a b tree ...
by jdhopeunique on Wednesday April 17, 2019 @10:59PM
(#19688383)
Interviewers underestimate the complexity and problems floating point numbers cause in interview questions.
What I find scary is that you think floor() is an easy algorithm. Here's a typical high quality implementation of floor() (Plauger's implementation in "The Standard C Library" is different, but of similar complexity). Not something you'd derive on a whiteboard: http://www.netlib.org/fdlibm/s_floor.c
I'm concerned that a question like this is selecting for mediocre programmers who'd brute force some solution, while causing programmers who are aware of the complexity of the problem to freeze.