News for hackers. Stuff that matters.
Re:Sleeping Through the Technical Interview (2022) by amalcon on Friday July 07, 2023 @07:59PM (#36639844)
In theory, since the argument to the sleep must necessarily devolve to an integer eventually, it could use a radix-sort or similar to perform in linear time. There are problem spaces where that can be a win, even after introducing a dependency on the magnitude of the largest value.

In practice, of course, no system actually does this. Syscall timeouts just aren't a place where this is typically beneficial. Also, naturally, it would be better to just directly apply a radix-sort which only scales with log(max_value) rather than linearly with max_value.

There are no comments on this comment yet.