Re:It is humiliating to have to do LeetCode grinding for
by paxys on Thursday November 28, 2024 @11:10AM
(#42266320)
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".
[ Parent
| on HN ]
Re:It is humiliating to have to do LeetCode grinding for
by foogazi on Thursday November 28, 2024 @12:14PM
(#42266914)
Once I started interview practice on leetcode I began to see algorithms & DS in everyday coding tasks
Re:It is humiliating to have to do LeetCode grinding for
by marcosdumay on Thursday November 28, 2024 @11:29AM
(#42266525)
> 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.
Re:It is humiliating to have to do LeetCode grinding for
by HDThoreaun on Thursday November 28, 2024 @10:18PM
(#42270505)
Absolutely 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
Re:It is humiliating to have to do LeetCode grinding for
by marcosdumay on Friday November 29, 2024 @08:34AM
(#42273743)
What? Neither of them are efficient in any practical sense.
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.
Re:It is humiliating to have to do LeetCode grinding for
by raydev on Thursday November 28, 2024 @01:40PM
(#42267578)
There'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.