something I've struggled to put into words for a long time: why i find reading about "data structures & algorithms" so difficult 👇
It's bc it's usually 10% data structures and 90% algorithms. I.e. the data structure is almost always a boring array or dict, and all the cleverness lies in how you shift the data around. Usually also involving an assortment of separate variables to keep track of various parts of intermediate state.
This means there is no *meaning* to be seen in any intermediate data structure. The data structure does not clearly indicate the meaning of any part of itself. The meaning exists solely in the context of what you *do* on that data, not how the data is *structured*.
And usually even the procedures you run on the data don't map to a semantically meaningful operation. It's just "shift this to this position in the array, then pop this, push that, and if you repeat that enough times, voila, you'll end up with your data organised how you wanted!
May 13, 2025 19:20But if each operation doesn't correspond to a *semantic* step going from further away towards closer to a solution, you may as well be reciting magic spells for all it means to you.
So you end up relying on rote memorisation for which algorithms & data structures are good for what problem and what their performance characteristics are. But these are all just brute statistics about what is effectively a procedural black box.
cc
@welltypedwit.ch you probably don't remember but I once mentioned (on the other site) that I found it really hard to learn about DS&A and you asked me why. Well here it is c: