Don't grind, bind to your mind.
One of the most common mistakes people make in preparation for technical interviews is grinding Leetcode. Mindless grinding serves no purpose. You must make an intentional effort at learning with the goal of true understanding.
There are various techniques to this but here is one to get you started.
First, set aside time for study and practice. For example, you could decide to Leetcode for an hour every Monday, Wednesday, and Friday. This amount of time could be enough if you already have a strong foundation, but you can adjust up or down depending on your experience level.
After setting a schedule, write down the topics you are strong and weak in. If you've already taken a data structures and algorithms class, you should have a good idea. Two common topics that people are weak in are recursion or dynamic programming.
Let's say you are weak in recursion. On Leetcode's problem page, set the tag to "recursion". Then sort by difficulty. Pick out around 5-10 problems to work on. For example I have picked out 9 problems, divided into 3 difficulties:
- Range Sum of BST (easy)
- Sum of All Subset XOR Totals (easy)
- Increasing Order Search Tree (easy)
- Swap Nodes in Pairs (medium)
- Binary Search Tree to Greater Sum Tree (medium)
- All Possible Full Binary Trees (medium)
- Special Binary String (hard)
- Number of Atoms (hard)
- Find Minimum Time to Finish All Jobs (hard)
At this point, you can solve one per day. Resist the temptation to do one after another. If you had trouble with a problem, ask yourself — why exactly did you struggle? Was it the syntax? Unfamiliarity with the data structures required? Or maybe you just didn't know the type of algorithm?
Each problem you do will shed some light on your weaknesses, so you should try to pinpoint areas that need extra work as much as possible. Avoid memorization at all costs. It'll do you no good in the long run especially since it doesn't take very much to change the problem class from one complexity to another with simple constraints.
The language you use to solve the problem doesn't matter. Python has generally been recommended but if you want to stand out, use the language the role required in the job description. For example, if the job asks for experienced C++ programmers, then solving the problem using cool STL tricks will help you stand out amongst candidates that used Python.