The Ultimate Guide To Coding Interviews

Gauri Rawat
Level Up Coding
Published in
6 min readJun 17, 2021

--

Software engineering interviews are intimidating. With the pandemic in place, getting a decent offer for a software developer role is challenging. The struggle begins right from finding the correct resources and continues with choosing the coding platforms, identifying the areas of focus, creating a schedule, sticking to it and ultimately being focused and motivated right throughout this journey. All of this gets a bit easier if you know what to expect and where to begin from.

Photo by Arnold Francisca on Unsplash

In this article, I shall solely focus on the DSA/coding interview which is the most challenging interview during SDE recruitment. These interviews are mainly to test the candidate’s problem solving skills.

I shall be covering the following items:

  • Target
  • Basic requirement
  • Important topics
  • Detailed timeline
  • Resources
  • Company centric preparation
  • Things to keep in mind

Target

Given any problem statement, you should be able to come up with possible solutions, choose the one more suited to your problem and implement it in the form of a working code.

Basic Requirement

You should know at least one language well: C, CPP, Java, or Python.

I’d suggest you to not pick up python as companies like Microsoft, Morgan Stanley to name a few, are strongly focused around OOP concepts and unless you’re willing to put in extra time for OOP, you’d rather not go ahead with it. Some of you might disagree here but this is what I’ve learned from my experience.

Important Topics

I have listed down the important topics below in no particular order.

  • Array
  • Linked List
  • Stacks and Queues
  • Binary Search
  • Dynamic Programming
  • Backtracking
  • Greedy
  • Trees: Binary Tree, Binary Sorted Tree
  • Graphs
  • String Manipulation
  • Hashing
  • Bit Manipulation

Detailed Timeline

The entire preparation spans over a period of 2.5–3 months and is divided into three stages. Stage 1 would focus on building the basics and fundamentals, stage 2 would be more practice driven while stage 3 would be the one which will get you your dream job. Let’s go through them one by one.

Photo by Emma Matthews Digital Content Production on Unsplash

Stage 1: Foundation Builder (20–30 days)

This stage would be focused on building a strong DSA foundation.

  • Cover each topic one by one.
  • Solve about 5-6 questions per day with appropriate conceptual understanding.
  • Prefer ‘GeeksForGeeks’ for concept building and ‘Leetcode ’for implementation.

Do not get swayed away by the recently asked or the most trending problems. Understand the fundamentals irrespective of whether you think companies will question you on them or not.

Operations such as inserting an element into a BST might seem like a trivial concept from interview perspective but if your land across a problem where given an array, you need to compute for each element the number greater than the current number on the left side of the array then knowing how to insert elements into a BST might come in handy.

Stage 2: Practice (30–40 days)

Take a step ahead and move from the basics to the DSA interview questions.

  • Switch to InterviewBit platform. It has about 350 problems (mostly easy, medium with some hard ones)
  • Try to solve all the questions in 25–35 days which makes it around 10–14 questions per day.

Interview bit has its questions arranged systematically under each topic which are sub categorised into buckets. Each day solve questions parallelly from two topics and pick them up from different buckets. This will help you better identify the paradigm a question belongs to.

  • Once completed, switch to leetcode’s “top interview questions” list.
  • Half of the questions you will come across in this list would coincide with the InterviewBit platform questions.
  • Pick up the remaining questions and try to complete them in the remaining 7–10 days.
  • Be conscious of the time taken to solve each question.

Stage three: Game Changer(15–20 days)

You will have prepared enough by now to get yourself into a decent job. Few students might even terminate their preparations here but this is THE game changing stage that will take you from a decent job to your dream job.

  • Identify the grey areas in your preparation. Pick up the concepts/ topics/ algorithms, if any, where you rely on your memory more than your understanding.
  • Give mock interviews and contests alternately to make yourself comfortable with coding under pressure in a limited time.
  • Make your preparation more company centric. Practise company wise questions. (We’ll talk about this later in the article)
  • To sum it all you’ll have to solve about 8–10 questions along with one mock/contest per day.
  • (Optional) Pick up a few advanced Data Structures/concepts(eg trie, segment tree, bit masking, binary lifting, etc). Switch back to GeeksForGeeks for concept understanding.
Photo by Iñaki del Olmo on Unsplash

Resources:

There are tons of resources available on the internet but the ones that I found most useful are mentioned below.

DSA core concepts/ fundamental building:

Basic problems

Practice platforms

Mock interview

Contest

A few extra ones

Company Centric Preparation

Towards the end of the second stage list down the companies that you have or wish to apply to. Divide these into two groups: target and backup. Pick up the top 3 or 4 target companies and analyse them. Practice their frequent and preferred topics. For backup companies, analyse them as and when you get contacted by the recruiter or they come for campus placement.

Leetcode, InterviewBit both have company wise archives. You can practise questions from there.

It is to be noted that companies do not repeat the questions. Doing company centric preparation does not mean you’ll end up getting a question which you’ve already solved. It just ensures that you are solving problems of a difficulty level similar to what is expected in the interview and have practised the important topics well.

Purchase Leetcode premium if you’re targeting the FAANG companies. I personally found it very useful.

Photo by Cristofer Jeschke on Unsplash

Things to keep in mind

Solving a problem is not enough

Even if you have solved the problem, have a look at the other solutions available in the solutions section. This gets your brain accustomed to trying out multiple approaches and helps you understand different perspectives. Also, analyse at the way people code. You might just come across some cool trick or function that you can utilise in your day to day coding.

Communication

It’s absolutely necessary that you communicate well with the interviewer. Even when you’re thinking, try to keep the interviewer engaged by speaking out your thoughts loud and clear. When explaining your approach you can cover points such as why you chose a particular data structure, the actual logic, the complexity advantage over an alternate approach, etc. Interviewers are often more interested in the approach than the solution.

Mocks are important

Mock interviews help improve your communication skills, performance under pressure, ability to identify the direction your interviewer might be pointing you to, decision making, time management, etc. I cannot stress enough on how important mock interviews are.

Be consistent

Set a goal before you begin. Be clear with what you want to achieve. If your goals are high then your preparation should be too. Try to be consistent and regular. Everything takes time. Some of you might even struggle with every question in the beginning, but that’s alright. Keep going. You’ll eventually get better with practice.

Photo by Hello I’m Nik on Unsplash

With all of these things on track, I hope you know where to begin from and what to expect of your preparation. But do note, all of the above is specific to just the coding interview. In order to crack SDE interviews, you need to prepare for System Design, Object Oriented Design, and behavioral interviews too. Not to forget the core subjects: Operating System, DBMS etc.

I shall be covering the preparation strategy for the some of the other interviews in my future blogs. Stay tuned!

Please feel free to drop in your queries in the comment section.

Good luck and nail it!

--

--

A software engineer who loves to travel, cook, read and paint but is a dancer at heart.