News for hackers. Stuff that matters.
Re:It is humiliating to have to do LeetCode grinding for by uberman on Thursday November 28, 2024 @11:22AM (#42266441)
BFS? Really, there are libraries for that and I would hire a kid who timidly used one as they could not remember how to implement it over someone who confidently introduced and off by one bug because they thought they knew how to implement it without references.
Re:It is humiliating to have to do LeetCode grinding for by foooorsyth on Thursday November 28, 2024 @02:04PM (#42267762)
BFS/DFS is astonishingly simple. It’s like 10 lines of code. And it’s almost always done (in practice) with a custom type where you work your way through custom fields pointing to the next vertex, so it’s not an algorithm / structure that lends itself well to standard libraries. It’s not like a self-balancing tree (which is actually a bug-prone, large implementation that you should just let the standard lib handle).

If you can’t trust the people sitting next to you implement a simple graph traversal without bugs, then your organization has a professional standards problem.