Leetcode premium -> do all the problems for the company you are targeting, sorted by most frequently seen in the last 6 months. Then, you will know what your weak points are (mine were minimax and disjoint set problems), and you can go through questions tagged with those topics. Aim to complete at least 60 problems, you should feel fairly comfortable with any Leetcode medium grades, and DFS implementation. Leetcode hard questions are good challenges which could expand the way you approach problems, but in my experience, did not show up much during onsite interviews.
Also, "completing" one problem in the context of the above does not mean being able to solve it the first time without checking the solution. It means possibly struggling with the problem for 20 minutes, checking the answer, and making sure you can do it the next day without looking at the answer. YMMV.
> Also, "completing" one problem in the context of the above does not mean being able to solve it the first time without checking the solution. It means possibly struggling with the problem for 20 minutes, checking the answer, and making sure you can do it the next day without looking at the answer.
Thanks for saying this. I tried leetcode last time I was looking for work and was thoroughly discouraged. This approach makes a lot of sense for someone who's been coding for a long time.
Also, "completing" one problem in the context of the above does not mean being able to solve it the first time without checking the solution. It means possibly struggling with the problem for 20 minutes, checking the answer, and making sure you can do it the next day without looking at the answer. YMMV.