Sure. True. However you do need to get good at thinking about these things.
For instance, practicing by knowing the type of problem (e.g. two pointer) then thinking, “alright, how do I apply a two pointer algorithm to this?” Not just looking at the answer and copy+pasting. You’re gonna end up having a bad time doing that. It won’t get committed to memory.
AFAICT you need to go through the physical exercise of typing things out and not typing them out as a computer but typing them out with mental thoughts involved.
For instance, practicing by knowing the type of problem (e.g. two pointer) then thinking, “alright, how do I apply a two pointer algorithm to this?” Not just looking at the answer and copy+pasting. You’re gonna end up having a bad time doing that. It won’t get committed to memory.
AFAICT you need to go through the physical exercise of typing things out and not typing them out as a computer but typing them out with mental thoughts involved.