3 ms·
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 confidentl
by uberman 2y ago
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.
- foooorsyth 2y agoBFS/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.