If you are preparing for next technical interview and are not able to find out How to use leetcode effectively then you are at the right place! This methods helped me a lot in cracking job interviews at Microsoft, and I am sure it will help you too.
When I started using leetcode for the first time I always used to wonder. How many questions are enough for each topic? Should I solve questions topic-wise or randomly which method is better? After how much time should I check the solutions? And should I check all the approaches or How many approaches should I check? and many more... I believe you are always facing this questions while using leetcode. Don't worry because you will find answers to them soon.
Below points are my observations that I found while using leetcode personally. Hope this observations help you.
It is always better to solve the coding problems without differentiating them into topics or any category. But if you are new to programming or just started your preparations, and know little bit of programming concepts than I would recommended you to learn the topic and try doing a small set of questions for that topic till you get the hands on them. Once you feel you have good strength of subject and have done good set of topics, you can start doing randomization in question set, which will not only help you solve the question but also help in finding the approach which can solve the problem.
We see people around us solving many problems on leetcode, they might have reached to 100, 200, 500 or even 1000! Often we think how many questions are enough for the preparation. I feel how many problems to solve is not the right question to ask, we should rather focus on our technic on choosing right problems to solve, because discussing count is difficult task or even might be impossible. But we can think of some technic of selecting questions which can help you get and solve better set of coding problems. My technic was to solve 6 Easy problems, 3 Medium problems, and 1 Hard problem, and repeat this cycle again and again.
Yes I would definitely recommended you to learn all the possible approaches for any problem, because this way of learning will not only help you find all possible ways of solving that problem, but also help in learning the new technic which you can use again to solve other set of problems in future. This way your knowledge of coding will keep on growing and also you will start becoming comfortable in finding better solutions for the given problem. Along with this we should also remember that giving more than required time is not good. My strategy was to think about any problem for 30 mins and find as many solution as possible and try implementing them, if I am not able to find some solution I will try to check the hint for the problem, not the complete solution, and think about solution from hint and so on.
These were few of my learnings which I had while using leetcode, and they made me use leetcode and my time in best possible way, and it finally helped me in cracking my dream company. Hope this steps helps you as well to crack your next interview!!
See you in next Programming Discussion
Till then Keep Learning and Keep Exploring!!