2 ms·
He's partially right. There's a lot of pattern matching involved. Like he describes, there are several broad patterns. But then there are sub-patterns upon sub-
by decafninja 5y ago
He's partially right. There's a lot of pattern matching involved. Like he describes, there are several broad patterns. But then there are sub-patterns upon sub-patterns. You need to be able to recognize these when the interviewer throws a problem at you.
You grind leetcode problems over and over so that you can better recognize these patterns and know when to apply their associated solutions.
The most idealistic scenario is you get a problem you've recently practiced verbatim. Then you just put on an act like you've never seen it before in your life.
But if you get a problem that you can match to a pattern you've practiced, then you're still mostly in a good place.