Learn the words in a problem that point to a hash map, a window, a stack, a heap or a graph search.
You finished "Solving a problem you have not seen": you can restate a problem, write the slow answer first, and find the better tool for two sum.
You have met the tools of the Data structures path: at least "Two pointers and sliding window", "Sorted arrays and binary search" and "Weighted graphs: Dijkstra and topological order", and the tutorials those build on.
Lesson 1 · Words in the problem point to a tool
Next: 3 · Ten classic problems, worked · 6 lessons · 1 h 15 min
Try the same model with your own values. No checks, nothing recorded.
Open the playground