Hacker News new | ask | show | jobs
by ap22213 3548 days ago
I've written DFS about 1-2 times a year, on average, for the last 15 years. Why do I need to? Usually, because I need to modify or create a data structure that is kind of graph-like but not quite. If someone didn't know how to write one or at least derive it, they would confuse a lot of people, so yeah it's kind of important.
1 comments

No, they'd probably look it up, skim a blog for a few minutes, then figure it out and promptly forget. This is no different than forgetting the order of the arguments to socket() and accusing that person of being incapable of writing networking code.
The difference is that the arguments to socket() were arbitrarily defined, but DFS is an algorithm. Anyone who has taken a intro data structures course should be able to at least derive the pseudo code for DFS.