Remix.run Logo
▲ skydhash a day ago

Not GP.

The trick is to get a good sense of the algorithms associated with basic data structures (list, stack, queue, graph, hashmap,...). They are primitives and almost any standard problem can be solved with those.

What you need to train most is the capability to break down problems: Like I have this input (and associated metadata), I have this context (may be null), I have those constraints (values, ranges, memory space, time, both, or neither), and I need these outputs. Then it's just a puzzle.

I no longer prepare for coding problems other than a quick refresh of the syntax of the main language. And if it's a whiteboard type of things, I go with pseudocode.