(1) try the problem, meaning get to the logic for the solution and then
(2) implement your solution at least once
(3) read the solution
(4) scrutinize incredibly heavily why you got it wrong or why your code wasn’t as efficient as the ideal solution <- this post mortem step is the secret sauce to getting better at these problems, but you have to go really really deep. At this step you will uncover some key learnings.
(1) try the problem, meaning get to the logic for the solution and then
(2) implement your solution at least once
(3) read the solution
(4) scrutinize incredibly heavily why you got it wrong or why your code wasn’t as efficient as the ideal solution <- this post mortem step is the secret sauce to getting better at these problems, but you have to go really really deep. At this step you will uncover some key learnings.
(5) build a map of the key learnings,
Rinse and repeat on new problems.