3 ms·
Basic data structures and algorithms knowledge is a base skill that will translate to better success in any software job. Yes you may not be coding graphs in yo
by paxys 2y ago
Basic data structures and algorithms knowledge is a base skill that will translate to better success in any software job. Yes you may not be coding graphs in your day job (although you might - I have personally done it before), but someone who can grasp stuff like BFS vs DFS and Dijkstra's algorithm will absolutely be better at the job than someone who comes in and says "idk who cares, I'll just use a library".
- uberman 2y agoBFS? 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.
- marcosdumay 2y ago> BFS vs DFS Yet, on the real world the answer is always one of "either" or "neither". Anyway, most leetcode aren't of the type of "a widely applicable algorithm solves this". People only know the algorithms that apply to them because they studied those problems specifically. And notice that one of the algorithms on your post is named after a researcher from the 80s. That's some 40 years after computer science became a thing. That's how long it took the entire humanity for learning it without anybody specifically telling it to them.
- HDThoreaun 2y agoAbsolutely not lmao. Many problems are more efficiently solved with bfs vs dfs or vice versa. If the problem requires you to reach a leaf dfs is usually better
- marcosdumay 2y agoWhat? Neither of them are efficient in any practical sense.
- foogazi 2y agoOnce I started interview practice on leetcode I began to see algorithms & DS in everyday coding tasks
- raydev 2y agoThere's an enormous gap between knowing when to use those tools and creating a solution with those tools when you already have the job, vs banging out a perfect solution in 20-40 minutes with someone looking over your shoulder, who is also deciding whether you deserve a paycheck based on those 20 minutes.