This question is for non AI folks. But really how often do you guys have to work with tree or graphs?
Daily.
What a load of crap!! Can you provide a usecase?
You mentioned that you are in Amazon. Unless you are in a VERY specific team, most everyone will just create micro services which will encompass some business usecase backed by a DB that supports the usecase and some messaging streaming tech to enable throughput. So despite all the lofty interviews, about 80% of us will end up doing pretty pedestrian stuff
Pretty often if you think of most structured hierarchical data as a tree
Whenever you use an hash map stl. You do use a tree. So that's pretty frequent. And graphs are common when you work with entities dependent on each other. Like amazon search, Uses graph based query preparation. It's almost daily. Thing is u might not be the one implementing it. But definitely the one using it.
Now ain’t that a moot point. That’s like saying that my grandma uses all CS programming techniques just because she uses her iPad!! 🙄
I had to use directed graphs a few times. In any case, the reason for them coming up in interviews is not that you need to be able to use them often in your daily work. The reason is simply that these data structures are fun to wrap your head around and make for some interesting algorithmic problems and discussions; back in the days when folks used to actually understand these and not LC for months and commit everything to memory ;)
Where are you going with this OP ? Is the next step grumbling about how the mean interviewers are grilling you on things they don't even use every day ?
I'm just thinking if I want to continue to be in a career that I must keep up a skill I don't value. I could just start developing a skill I do value instead.
Having strong algorithmic and systems knowledge may not come up often, but it changes the way you think.
Algorithmically, not often. But practically, every day. The DOM is a tree and if you're doing any interactivity on a page you'll be traversing and sometimes modifying the tree. Boggles my head when someone is tasked with finding the parent node of a given node, and they start from the root searching for the given node... yes this happens. Also we work with graphs a lot for build dependencies. If your build takes a long time because it's needlessly rebuilding entire subgraphs, you need a way to detect that.
I see that pun that you baked in there. Is the DOM doubly-linked, or do they just need to call a certain method that'll get the parent?
Doubly-linked. People just don't know the API available to them so they reinvent the world but poorly.
Graphs (DAGs) for task and dependency management
Let's be honest, you really don't use this kind of stuff everyday. But doing a graph problem on a whiteboard is so much easier than doing real software development, that if you can't / aren't inclined do it, you probably aren't cut out for it. It's like an author saying they don't need to learn how to spell, because that's not what being a writer is about, and spell check does all the work for them. While technically true, if you can't spell, then you probably can't be a good author.
Trees? Every other week when tending to the garden. And graphs, once a year when I look at how my SS is doing :)
Shoo non-FAANG ——edit ( shoo non-useful answer )
Have worked in Amazon, Netflix and Apple so chill buddy!!