My STL Post Sparked a Real Discussion - Here's Where It Landed
Algorymer came back with more thoughts after the AoC article. The conversation drifted from "which container to use" to something bigger: is the tool even the point?
The Argument
Their point: the real skill isn't picking between vector and map. It's breaking down a problem on paper first. Language and data structures are just implementation details. A good solution works in any language. They're not wrong.
Where I Agree
When I solve problems on Luogu, I sketch on scratch paper before typing. Not because it looks smart - because jumping straight to code means rewriting everything three times. The container choice comes after you understand the problem. If you don't know what operations you need, how can you pick the right tool?
Where I Still Disagree (Respectfully)
Yes, the core skill is problem-solving. But here's the thing: if your go-to solution for every problem is int arr[1000], you're making the problem-solving step harder too. You're translating the problem into a form your limited toolbox can handle, instead of into its natural shape. Picking the right container is part of problem-solving. It's not separate from it.
The Middle Ground
Someone in the thread said: "use pen and paper, use imagination, the language doesn't matter." I'd say: use pen and paper first. But when you reach for the keyboard, reach for the tool that matches your mental model. If your brain sees stacks, type stack. If your brain sees key-value pairs, type map. That way the code validates your thinking instead of fighting it.
Thanks Algorymer for pushing the discussion beyond syntax. That's the good stuff.
My GitHub: https://github.com/Cn-Alanwu
Comments
No comments yet. Start the discussion.