3 ms·
POSIX `hsearch` is absolutely terrible and almost useless, but... it would get the job done for this problem.
by shawn_w 2y ago
POSIX `hsearch` is absolutely terrible and almost useless, but... it would get the job done for this problem.
- BoingBoomTschak 2y agoThe advantages of foregoing hsearch is that I don't have to understand its weird API that works only for NUL-terminated string keys and that I don't require POSIX. Remember that brute force is also a solution in the AoC; had plenty of fun using SBCL to crack some problems where Pythonistas had to be clever, last year =)