I imagine any regular SWE at Anyone here regularly using/thinking about these? And I don’t just mean small things like when to use an array vs a map but the more complex stuff
So my solution was to turn each phase’s graph into a binary tree by converting the n-tree to a b-tree where each node has a parent, a child, and a sibling to make traversal easy. Then I gathered all of the nodes into a single ordered array of structs and used array indices to reference parent, child, sibling for each phase.
To trace up, you selecting the starting node and the phase and it would walk up the graph to a source or you could specify a source node and transverse down by phases to create a downstream trace showing all affected customers.
Each node also had protective devices, like fuses and switches, that could be activated/deactivated or predicted as sources of outages.
At the time, I could downstream trace to every customer of a substation in a second or less when most GIS based network traces took 10-15 seconds sometimes. Upstream traces were almost instantaneous. Plus, our customers often converted CAD to GIS and the lines lacked spatial connectivity without a lot of cleanup, but my trace engine could handle disconnected lines and devices that weren’t spatially connected by using attributes.
It was the biggest use of my data structures and algorithms knowledge that I’ve used and it was good enough for a software patent.
Whether or not you use them in your work depends on the industry you work in. I reckon at Databricks or
Unless you work at the cutting edge, developing new database engines or cutting edge algorithms, you rare use data algorithms. My day to day challenges are not the algorithms but understanding requirements from humans.
We need efficiency and control, and that usually requires developing our own data structures and algorithms rather than using what's in standard libraries. This is amplified by our need to keep the use of third-party libraries to an absolute minimum.
Plus, writing algorithms gives you lots of practice with recursion and iteration, and knowing when to use which where. And it's fun! You may not use the knowledge directly, but you do pick up a lot of little useful nuggets for real enterprise development.
I think a lot of developers, even ones that studied computer science, don’t see it as useful or relevant. I feel like that makes them underestimate what the modern computer is capable of and also want to reach to the next shiny object to add to the stack.