Comment

Comment by microtherion

> We pick something boring, say from the standard library, and nothing tricky like a hash table. Really boring like floor(). If you can't figure out how floor() does its "magic" that's scary.

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.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton