How I Prepared for Coding Interviews in 3 Months.

Ujjwal Sinha
The Startup
Published in
6 min readAug 9, 2020

Coding Interviews require time and practice to ace. You need to be thorough with all the concepts and also be confident about the projects and internships you have mentioned on your resume. This article will give you a complete roadmap for your preparation and how I prepared for my interviews in around 3 months. This article is intended for a fresher who is about to enter the placement season and not for people having a few years of experience. I started my preparation in the month of March 2020, just after the commencement of the worldwide global pandemic.

Before you go any further in the article, I would like to give a brief about my background. I am currently a final year B. Tech student from Vellore Institute of Technology, Vellore with a full time SWE offer from Société Générale. Throughout my degree, I have worked on projects in various domains like AI, Android and Web. So, what do I mean when I say preparing for the interviews when I have had some coding experience in college? Two things basically :

  1. Undergraduates are judged only on their coding, problem solving and computer fundamentals knowledge and not on the tech stack they have worked upon. This is the reason, an AI guy might turn out to be a Full Stack Web Developer or an Android Developer may turn out to be a great Data Scientist. The technologies you work upon when you join a company may not be the technologies you work upon as a college student.
  2. The hobby projects which freshers mention in their resume rarely are up to the standards of the enterprise projects. Enterprise level software should be scalable.
Data Structures and Algorithms for the base of any coding interview

Now, coming to the placement strategy, I will basically divide it into 4 parts:

  1. Choosing a language — This is the first step for any student aiming to join a product-based company. Choose any language which you prefer and stick to it. Do not change it after a month. Go for any Object Oriented Language from Java, C++ or Python. I prepared in Java. The reason I have excluded languages like JS, C# from the list is because lot of companies do not give you the option of choosing a language other than the 3. Therefore, playing it safe, select any one of the three I have mentioned. Learn the Object Oriented Programming concepts and try to implement all of them in the language you have selected. Luckily for me, I had the Java Programming course in the sixth semester of my college, i.e, just before I started with my preparation. Thus, I could basically skip this step as I had covered these concepts pretty recently and the information was fresh in my mind.
  2. Data Structures and Algorithms — This is the most important step of your process. DSA accounts for up to 80% of the questions you get in a coding interview. This step involves learning the basics of DSA and not competitive programming. Select any resource you are comfortable with and stick to it. You can choose either a book or a website. However, choose a single resource and stick to it. I studied from the book called Data Structures and Algorithms made easy in Java by Narsimha Karumanchi. It is one the most complete book out there and is extremely beginner friendly. The book contains multiple questions which are solved using multiple different approaches. The topics to be studied are — Arrays, Strings, Linked Lists, Stacks, Queues, Trees, Graphs, Greedy Programming, Recursion, Backtracking, Dynamic Programming, Bit Manipulation, Binary Search and Sorting Algorithms. In the next couple of months, I will be writing separate articles on some of the important and difficult topics among them and try to give a walk through of how I studied all of them.
  3. Competitive Programming and SQL — The third step is to get your hands dirty in the world of competitive programming. The types of questions you get in Competitive Programming(CP) are a bit different from the types of questions you get in the interviews. CP is a bit mathematical whereas interviews are a bit focused towards DSA. This is the step where you apply the concepts learnt in the previous phase and build your actual thinking ability. I highly recommend solving questions from any one of the proper competitive programming websites like Codeforces, Codechef or Hackerrank as the type of questions you get in these platforms are generally questions you have not seen before. This trains your mind in thinking about the most optimized solution on the spot and will build your thought process. Apart from this, solve questions from any one of Leetcode or Geeksforgeeks depending upon your personal preference. Apart from this, I highly recommend you to brush up your RDBMS concepts. At the same time also practice SQL questions from any website of your choice.
  4. Revision and Mock Interviews — This is the final phase of the preparation process. Revise the concepts of Operating Systems and Computer Networks as companies tend to ask question from these topics in the online test as well as in the interviews. The final step which you need to follow and which I would say becomes the difference in you acing your first interview or not is practicing mock interviews. This step is a must as it gets you into the feel of how you need to approach the interview. This also removes the fear which you posses for the interviews making you completely comfortable with the process. During interviews, explaining your thought process to the interviewer is more important that solving the question. Thus, do at least 5–10 mock interviews before the placement season begins on Pramp. Also, go through the book called Cracking the Coding Interview by Gayle Laakmann McDowell a week or two before your interviews for a final revision.

TIPS:

  1. Solve the questions the correct way. Always get out of your comfort zone and allow your mind to think. Otherwise, even solving a thousand questions won’t get you through.
  2. Having a breadth first knowledge of all the topics is recommended rather than having a depth first one. This will allow you to think in all possible directions for a given problem.
  3. Never ever mug up a particular approach. This will easily set you a couple of months back in your preparation. Although, it may seem as a shortcut but will definitely harm you in the long run as you are confining your mind in one direction.
  4. Whenever you learn a new algorithm, always try to implement it by yourself before looking how it is implemented in a language. This will increase your grip in the programming language of your choice.
  5. Along with programming skills and computer fundamentals, having good projects in your resume is equally important. It will allow you with some breathing space and will also give the interviewer a good impression about your problem solving skills with respect to a real time scenario.

RECOMMENDED RESOURCES:

  1. Data Structures and Algorithms made Easy by Narsimha Karumanchi
  2. Cracking the Coding Interview by Gayle Laakmann McDowell
  3. Leetcode/Geeksforgeeks for DSAquestions.
  4. Codeforces/Codechef/Hackerrank for Competitive Programming.
  5. Knowledge Gate youtube channel for DBMS and OS.
  6. Hackerrank for SQL Questions.
  7. Gate Smashers for Computer Networks.

This is basically the strategy which I followed during my preparation and the strategy I would recommend to any junior for their preparation. There are still lots of things which I have covered only up to a superficial level in this article which I would be covering in the future. Till then, Happy Coding :)

--

--

Ujjwal Sinha
The Startup

Incoming SWE at Société Générale | Data Scientist | Software Developer | Final year IT undergrad from VIT, Vellore.