3 ms·
You beat your head against the wall, submit your solution and see how it compares runtime-wise and memory-wise with others. If you're not scoring well on those
by gcheong 5y ago
You beat your head against the wall, submit your solution and see how it compares runtime-wise and memory-wise with others. If you're not scoring well on those metrics, then you go to the discussion to see if there are better solutions and re-implement and resubmit with the goal of understanding how the solution works. After doing this enough times you start to notice patterns of solutions to different classes of problems. If you want something that is more guided at a regular pace, have a look at interviewcake.com