Ace that coding interview

Sunny Dhamnani
DemuxAcademy
Published in
7 min readJul 14, 2019

This article is meant for sharing resources to prepare for coding interviews.

First of all, let me put a question — do you need to separately prepare for the interviews in spite of being good at academics?
Yes, you learn concepts in the curriculum but in interviews, you are asked to solve problems using those concepts. Learning is one aspect and application of those concepts is the other, and moreover, not all concepts are used so you should prepare right to get the best results.

I am assuming you have close to 6 months for your interview and have very little or no competitive programming experience. Here I will outline the most important things to keep in mind for each of the aspects of the interview.

Resume Preparation:
Give sufficient time for resume preparation, never rush. Decide what content needs to go according to the job profile. If you are not sure about the content discuss with others to get a sense of what to put and what to avoid. Iterating it over and over makes the content succinct. Write only those projects in which you have done significant work and trivial projects will only dilute your CV. Do add the impact your work created, numbers help a lot. For instance, you could mention that your work led to a 50% increase in accuracy. Do not add more than four bullet points per project, three would be optimal. If you used any specific technology do not forget to mention it. If you have the project up on Github providing link would be very impressive. Make sure you know and understand each and every word of your resume and are able to comfortably speak about it, never fake anything in your resume. Make sure your resume has no spelling errors or grammatical issues, and of course get it reviewed by some grammar nazi :P. I had the following sections in my resume:
Education; Work Experience; Publications; Skills and Expertise; Projects; Awards and Achievements; Coursework Information; Positions of Responsibility; Extra Curricular Activities.

Online Coding Tests:
The bread and butter for interviews is coding, for this, you need to code accurate and fast. Try to do well in online tests since they (in some cases but not all) play a major role in your final selection.
To achieve the speed and accuracy you need to practice a lot. I would suggest start coding today and do it every day till you are comfortable enough. Learn basic coding from SPOJ, complete 60 most solved coding questions. Do not spend too much time on a question, see the solution after an hour or so, then code yourself. Try to do it within 3 weeks of time. The main idea is to get comfortable with the coding language and basic problem-solving. After this start coding topic wise and practice on InterviewBit. This might take two to three months but it is worth it. With this, you will learn the implementation of data structures and algorithms and also their applications. Both the implementation and the application are important for programming interviews. Also, after you have solved a problem always read the solution so that you do not miss the elegant ways of solving the problems.
Once done with InterviewBit you are already prepared well for interviews and if you have time left read TopCoder Tutorials and do LeetCode. In LeetCode you can read top solutions which are a great and fast way to learn problem solving and effective coding. The main learning lies in discussing your code with your friends and reading code of other good coders, you will only realize it when in the process. This process requires 3–4 months for comfortably completing but again the earlier you start the better.

Companies like WorldQuant and Tower Research require quantitative and aptitude skills, for that you can practice from geeksforgeeks page for aptitude questions. For probability theory refer to the book Fifty Challenging Problems In Probability. For puzzles and more probability questions practice from the book Heard on the Street.

Apart from this, a basic understanding of Computer Science Fundamentals is required. Be very clear with the concepts of OS, DBMS, Networks and C++. For preparing these I found geeksforgeeks very effective. Read in groups and discuss concepts with your friends. Practice MCQ for these from geeksforgeeks page since learning concepts is one part and being able to solve questions is other.

So the list boils down to
1. Coding: SPOJ, InterviewBit, TopCoder, LeetCode
2. Basic CS Fundamentals: geeksforgeeks, course slides for reference
3. Probability, Puzzles, Aptitude: geeksforgeeks, Fifty Challenging Problems In Probability Book, Heard on the Street Book

F-2-f Interviews:
The ideal way to go about an interview is to consider it to be a conversation as opposed to being a test. Treat the interviewers as your friends. Do not panic, it is just a matter of staying calm and being yourself.
I group interviews into two categories: Tech rounds and HR round, I will write for each of them separately.
Tech round, interviewers can potentially ask you-

Coding Questions: You are expected to write a clean code on the paper. In my opinion, one should practice writing codes on the paper, getting it right in one go is challenging. Develop your own style of coding and make sure you can communicate well what you write. Commenting code is considered to be good but overdoing looks ugly. Discuss your approach with the interviewer before coding. Think twice and code once. Make sure you write modular code (separate methods for different tasks) which makes the overall solution clean and concise. Also, the interviewer might ask you to do the complexity analysis of the solution so be prepared for any such queries. The interviewer judges you based on your approach and code so if you are able to impress any one of them then you are definitely in. Missing corner cases is a crime not to be committed. If you are stuck then you can definitely ask for help but don’t just directly ask for it, discuss some idea you are thinking and ask whether it is correct and in the process interviewer might provide hints. Keep your ears and mind open.

Probability, Basic Mathematics and Puzzles: I have already mentioned the sources for these. Additionally, you can look at the puzzle section of InterviewBit. If you are naturally good at mathematics you will definitely have an edge.

Computer Science Fundamentals: OS, DBMS, Networks and C++ related questions, geeksforgeeks is a great help. Course slides are also helpful.

CV-Related Questions: The most common question is to pick a project and explain, but do not restrict yourself just to that. Make sure you know you know your CV in and out, from theoretical concepts to practical implementations. If stuck on a query related to your CV then definitely you are out since it indicates you are lying and are not committed to your work. Do not keep CV preparation for the last few days, plan early and prepare well. When describing a project keep a template in your mind, like you can start with project title, then speak about the aim of the project and the problem statement, further discuss the solution and challenges involved. Make your own workflow, keep it concise and easy to follow.

System Design Questions: There is a good collection of system design questions at careercup. The basic idea is to design a system which should be scalable and can handle concurrency, make sure your design does it too. If you had some course of system design (like Distributed Systems) it will definitely help.

HR round:
This happens when they want to select you so it is a selection process as opposed to a rejection process. Please do not take this round casually. The interviewer genuinely wants to understand your aims and aspirations to see if you are a good fit for the organization. The better you understand these things yourself the better you’ll be able to talk in there. Again, it’s just a conversation with a prospective co-worker and you’d want to treat it that way. Discuss things like why a particular company and why do you think you’ll be a fit for that company with your friends beforehand. The more convinced you are of your answer the more convincing it’ll sound. A bit of background check of the company and the profile are necessary and sufficient to target the organizations in particular. You can potentially talk to the seniors who are already working in the company to better understand the culture, vision and work at the company. Additionally, prepare well for the questions like
Why would you want to join this company?
What are your interests?
Why this job profile?
How are you different from your colleagues?
Describe a difficult situation and how did you overcome it?
What are your strengths and weaknesses?
Why engineering?
What did you like most about our ppt?
What do you know about the company?

Departing Words:
In the preparation, it is very important and almost necessary to have a group with whom you can discuss your problems and solutions. Never treat your group members as a competition, it is there to push you up and to keep you motivated. Some people might lose interest and momentum while preparing but believe me, the team takes you along. The real essence of teamwork can only be felt when in the process. I found this picture on the internet which depicts this idea so well.

Another point to be kept in mind is to choose companies wisely, it is better to target a few companies than to get shortlisted in every other company. I thank all my friends whose invaluable experiences are transformed into this guideline.

--

--