While working out/ preparing the problems, do you actually execute the code and see Or just put down the code on whiteboard/ paper?
First, I write it on paper/whiteboard, then run it on leetcode, once it’s accepted, I look at how it compares to others’ code on the runtime distribution chart and optimize it if its runtime is high compared to others.
Wait Leetcode shows you the runtime distributions of the submissions?
Yes, click on ‘Submissions’ tab, click on an Accepted submission, and it’ll show you where it’s at in the distribution. It only shows this for problems that have a sufficient # of accepted submissions though.
Time each and every question and track progress.
Won’t this slow down your progress for covering larger set of questions? How about using geeks4geeks which have answers as well ?
True. I meant the one you're practicing, time it so that you can improve. If you're able to solve them consistently, you can skip the ones which have same logic. After solving a lot I've realized that a lot of problems in dfs, bfs and trees can be skipped. But in arrays each one is different in it's own way.
whiteboard