Growing Algorithmic Skills for Coding Interviews

❤️ TensorFlow, Python, ReactJS, GatsbyJS. Love to work on the end-to-end project which includes cross-framework implementations.
Search for a command to run...

❤️ TensorFlow, Python, ReactJS, GatsbyJS. Love to work on the end-to-end project which includes cross-framework implementations.
No comments yet. Be the first to comment.
One of the best world-class experiences of my life. Not just from the learning perspective but also from the perspective of work culture, support, and diversity. Before I go into the details about my work during the internship, I first need to introd...

React Awesome Shapes is a recently released open-source NPM package with which you can insert beautiful shapes into your React site. This seems to be a very small utility and it is a small utility but it has an amazing effect on UI. For example, you ...

Background: I was rejected in Facebook (SWE), Palantir (SWE), and EY(Tech Consulting) even after answering all coding problems with optimized algorithms. Those rejections hit hard. Rejection doesn't hurt. Not knowing the reason does. I was really...

GitHub records the traffic data (number of views and clones) to every repository. This can be seen in the Insights -> Traffic in the repository. Generally, the graph in the traffic tab shows the views and clones for the last 14 days. It shows not jus...

Most computer science students are usually scared of algorithmic coding interviews. The fear is that they will get an unseen coding problem in the interview and they will just go blank and will not be able to solve it.
The solution to this situation is to be able to break the algorithmic problem into pieces and thinking solutions for each of those pieces. But how do we do that? Let's dive deeper into the systematic process with which you can cultivate the skill to break the problem.
Some developers have the perception that you can only be good at coding problems if you regularly do competitive programming. This one is just a misconception. CP (Competitive Programming) is just like a sport. If you like to play, you play it. Just like playing soccer makes your physic stronger, doing CP strengthens your algorithmic skills. That's it.
But for coding interviews, you don't need to be a Codeforces Grand Master. You just need to develop problem-solving skills. That is enough for the coding interviews. The reason behind it is that you will be asked logically breakable problems (in 30-40 minutes) during coding interviews which do not require very advanced CP skills.
As you may already know, the best platform (IMO) to practice coding problems is LeetCode. You don't require to buy premium and I also don't think you should go for paid platforms like algoexpert if you have sufficient time to prepare.
If you have limited time to practice coding before your interview, then you may consider buying LeetCode premium or algoexpert which will give you a set of popular coding interview problems. It will increase your chances in the interview. But note that remembering patterns of popular problems is different from cultivating problem-solving skills.
In the later section of this blog, I will describe a strategy to slowly grow your skills such that you will never be afraid to face any unseen problem.
Which problems should you solve? It is simple. Just open LeetCode's problems section and start solving.
Have you ever got frustrated because the LC problem is too hard for your current knowledge? In contrast, have you ever felt unproductive because the LC problem is too easy for you? Yes, most of us have been in both of these situations. In both of these situations, we get disheartened and lose interest in practicing the problems.
How do we practice then? Be in a state of flow. What do I mean by that? Solve a problem that pushes you a little bit but for which you already have the tools to solve. How do we know which problem to choose?
heapq which I have never heard of." Why worry? Google heapq and read about its usage. Now, you have figured out the solution. Try to implement yourself. Solved! "Ohh God, it took me 2 hours to solve this problem. I am tired". Why? You have actually made a progress. You have understood the explanation. You learned a new module called heapq which will definitely help you in future practice. You might have looked through multiple implementations of solutions from the discussion section. It significantly improved your capabilities since you now know different ways to approach a problem. That is a victory. It is much better than solving 5 easy problems and much much better than being stuck on a very hard problem.The above-described strategy works best in my opinion. You don't force yourself to practice just because you want to prepare for an interview. Understand your mental state while solving the problem and then choose the problem according to that.
This also works for the time of the day as well. For example, if you are practicing problems at night and you are tired, don't start with the medium problem. Instead, start with easy. This is the way in which you can choose problems. Note that you don't have to follow this exact strategy. You can modify this or discover your own which works best for you. The important thing is you have to choose the problem such that you be in a state of flow (Not too easy, not too hard).
By following this strategy, you will not see improvement in numbers. You may only be able to solve 1-2 problems in a day. But note that the effectiveness and the quality of the practice that you established are amazing. By following this strategy for a longer period of time (depending on your current knowledge), you will slowly start noticing the below advantages.
Personally, I don't think you need to spend time solving LC hard problems. If you have good command over easy and medium problems, you will be able to solve any kind of problem in a coding interview. I have experienced this. I have not solved any LC hard problems (except weekly contests) but still, I was able to solve all problems in all interviews at TikTok where problems were equivalent to LC hard. So rather than solving LC hard problems, solve as many medium problems as you can.
Apply for jobs/internships. Got an interview? Congratulations 🚀. Attend an interview like a Pro 😎.
Thank you for reading this blog. Note that the ideas described in this blog are my opinions and you may not agree with them. In such cases, I recommend exploring other options as you like.
I (Ashutosh Hathidara) am an artificial intelligence engineer, full-stack developer, and designer. I can be reached via:
Email: ashutoshhathidara98@gmail.com
Twitter: @ashutosh_1919
Github: @ashutosh1919
Discord: DevSense
LeetCode: @layman_brother