My learnings from giving coding interviews

let's crack coding interviews

My learnings from giving coding interviews

Being a software developer, you want to work on large-scale systems that serve thousands to millions of users. Not everyone gets this chance, only a few lucky chaps get it. The other people try to get into such companies. The hard truth is it's not the company that matters most, it's the team that you're part of that is very important. To get into such teams, you need to raise their bar. So, you need to pull up your socks, come out of your comfort zone and start preparing for interviews. In this post, I will share my learnings from past experiences.

Note: assume that the interviews are given to top product-based companies and consist of 2 DS algo rounds + 1 or 2 system design + 1 manager/vp/director of engineering round + 1 behavioral + 1 HR/final discussion. In DS & algo rounds, the questions are mostly from leetcode.

  1. Bad interviewers

    Sometimes you may encounter bad interviewers, they may make you feel nervous ending up you bombing the interview. I faced a similar situation in an interview which ended in rejected status. In such cases, you should take the responsibility to make the interview look like an interactive session not like an interrogation. Few interviewers may not introduce themselves, they directly ask about you and jump into coding problems which may make you nervous. You should stop and ask them about their introduction, which team they belong to etc. This sets the atmosphere of the interview.

  2. Do not solve the leetcode problems partially during the preparation

    When you are preparing does not solve any problem partially. Solve them completely until you understand it. I was solving this problem a few days back before it appeared in the real interview. I had solved it but i still had confusion about the approach. I did not clear them up before, so i screwed it in the interview. So, do not take the leetcode problems lightly when you're preparing. When solving a question, think of it as it is asked in the real interview. How to solve a leetcode problem completely?

    1. Try solving it by yourself first.

    2. Spend 15 mins, 30 mins, 45 mins on easy, medium, and hard problems respectively. After spending the time, if you are not able to solve, open the solution, understand. Figure out the edge cases and normal cases, understand how the algorithm handles them.

    3. Once you understand it, try writing the solution without taking help/hints. This is the time that tells you whether you have understood the solution correctly.

  3. Revise the leetcode problems

    It happens to all of us that you solve a problem today and after a few days you try to solve it again, but are not able to. You get upset and lose the motivation. Remember, it happens to everyone and it is quite common. The only way to become confident is to practice. Nothing beats practice. The more you practice the more you understand. Prepare an excel sheet of problems that you are afraid of and revisit them often.

  4. Interview is a race between you and time

    The interviewer gives you a question and the timer starts. You need to solve it in the stipulated time. Let's see what you can do to pass the interview.

    Only focus on the approach - Focus only on the approach. Try generalizing the problem and performing mathematical analysis such as forming a recurrence relation, figuring out the dp state, etc... Personally, I refer to Introduction to algorithms, by cormen. It changes the way we look at the problem.

    Take data-driven decisions - It means when you are stuck, look at the problem statement again and find if you see anything related to data such as array is sorted, the graph is acyclic, etc...

    Write down your thought process - This will help you build the thought process and drives you towards the solution. Personally, it helped me very much. There are problems I have not seen before and am not confident of solving but able to solve with this approach.

    Set a timer - This approach has pros and cons depending on how we use it. Use it in a way to divide your time for problem analysis and explanation, then for coding. Set a timer when the interviewer is asking the question. Timer helps you how much time you had spent on analyzing the problem thereby reducing your anxiety.

  5. Don't put multiple interviews on the same day - If you did not perform well in one interview, it'll affect the other. You will not have time to re-motivate. Put at least 2 days gap between two interviews. Also, in each interview, you have to tell the same introduction, about the projects which will make you feel bored.

  6. The more you fail, the more you learn - Failing in interviews is very common. It's not like your board/college exams. There will be so many factors affecting it. I know how it feels, almost like a heartbreak. One big disadvantage is the recruiters won't tell you the exact reason why you're rejected. They give you some false-polished-canned responses. You feel bad because you set high expectations for yourself. Try to lower the expectations. One tip, I can give to overcome this is "get rejected a lot so that you get used to it" .

  7. Be yourself - don't try to impress the interviewer. Just be confident and be yourself, you don't need to look like an intellectual to pass the interview.

  8. Problem solving is a lifestyle - In my opinion, problem-solving should become your way of living life. It should embed in your lifestyle. Be it a software engineering problem, DSA problem, or anything related to life, should look at it as a problem and find an optimal solution. This kind of mindset really helped me in my life especially.

Did you find this article valuable?

Support Lokesh Sanapalli by becoming a sponsor. Any amount is appreciated!