Most people learn data structures and algorithms the hard way: they open a problem site, sort by "most solved," and start grinding. A month later they can recite that a hash map is O(1) but they freeze on anything they have not seen before. The grind teaches recognition of specific problems, not the underlying skill.
Here is an approach that actually builds the skill, in three phases.
Phase 1: Build the foundations from scratch
Before you use a structure, build it once. Implement a dynamic array, a hash map, a stack, a queue, and a linked list yourself. It takes an afternoon each and it changes how you think.
When you have written the resize logic of a dynamic array, "append is amortized O(1)" stops being a fact you memorized and becomes something you understand. When you have handled collisions in a hash map, you know exactly why a bad hash degrades it to O(n). This understanding is what lets you reason about a brand new problem instead of pattern-matching to one you have seen.






