4 ms·
For solving leetcode style problems: (1) try the problem, meaning get to the logic for the solution and then (2) implement your solution at least once (3) re
by amznbyebyebye 5y ago
For solving leetcode style problems:
(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.
- socratees 5y agoCan you kindly elaborate on steps 4 and 5? How do you do that post-mortem? I can agree, let's say if the problem is 'pick top k elements', and you already know what needs to be done, you can hone in on what went wrong. But in cases where you don't know how to come up with the steps, how do you go about that? Thanks!
- deleted 5y ago[deleted]