Skip to content
Related Articles

Related Articles

How to Prepare for Coding and Technical Interview Rounds ?

View Discussion
Improve Article
Save Article
Like Article
  • Difficulty Level : Medium
  • Last Updated : 11 Feb, 2021

I will begin by giving a brief introduction about myself.

I am pursuing my B. Tech in Computer Science Engineering from NIET, Greater Noida and I am a 3rd-year student. I am currently an intern at SAPIO ANALYTIC as a Database Associate Intern.  

I started off competitive programming in 2-1(2nd Year 1st Semester). So I had around 1.5 years of experience in competitive programming while I was sitting for placement tests. Having a strong background in competitive programming really saves your ass while others keep reading GeeksforGeeks to prepare themselves.

How to crack the interviews and get a decent job?

So, the organizations will be coming in many colleges soon, and conduct their shortlisting tests. Now, I will be talking very short and to the point. Each point is important.

Basic Skill Set (BSS):  

  1. Quick implementation & debugging (practice questions on codeforces, hackerrank, participate in contests)
  2. String Matching (important, KMP, Z-Algorithm, etc)
  3. Binary Search, Sorting, STL (sets, maps, unordered set/map, vector, sort) – very very very useful
  4. Data Structures: (Linked Lists, stacks, queues, BIT useful, Segment Tree – asked in Google)
  5. Dynamic Programming: Very important (medium level problems, all companies ask)
  6. Binary Trees & BST: Super important! (All companies ask this)
  7. DFS/BFS questions on Graphs (Dijsktra and flows are rarely asked)
  8. DP on Trees (yes, an important topic)
  9. Greedy, Backtracking: (Important, can be tricky)
  10. Math Concepts like Prime Sieve: Not that much important
  11. Bitmask DP: Sometimes asked in interviews, cover it later.

I think this is enough for cracking through most of the recruitment tests. Though there are always many other topics that can be covered, but I would suggest don’t get overwhelmed and focus on these first. Once you are ready with these basics, you should move on to study other Data Structures and Algorithms. Knowing more and in detail will always make you more interesting and awesome.

Many recruitment problems are based on usages of sets, maps. Do many practice problems based on them. Eg: see this, and the solution.

People who don’t do CP should immediately do the following:

  1. Need to improve implementation, debugging skills.
  2. Learn the basic set of data structures and algorithms as mentioned above.
  3. Begin by doing all 37 problems on GeeksforGeeks under the array category.
  4. Move on to DP on GeeksforGeeks.
  5. For sets, maps I think problems on CodeForces like I mentioned above will be better.
  6. Cover other topics like greedy, DFS/BFS from GeeksForGeeks.
  7. Linked list, binary trees and their traversals. (Important!)

This should take around 2 weeks. I don’t think people who are consistently doing CP would face the need of doing linked lists, stacks, etc. from GeeksforGeeks. But it’s good if you give it a fast skimming read.

What next?

Now start off at interview bit and solve problems there so that you familiarize yourself with verdicts like WA, AC, etc and also how to respond in case of TLE or WA. This will improve your implementation and debugging skills. This will clearly help you understand the various concepts like DP, trees, etc.

You must also participate in the ongoing challenges on sites like CodeChef, CodeForces, Hackerrank, etc. Once you are stable blue on CF around 1700, you can easily clear the recruitment tests. Then all you have to do is brush up your explanation skills so that you can clear the interview rounds too.

Note: Speed is important. Many times people fail by 10-15 mins to implement the algorithm correctly. This will really turn you off. So keep practicing every day!

Tips for recruitment tests:

  1. Be fast. Don’t just keep on waiting for finding the solution.
  2. If stuck on a problem, proceed to next. First solve all of those that are easy.
  3. In the end, ALWAYS submit the worst brute force solution no matter what complexity. YES! The test cases are many times weak, and you get pretty high score.
  4. You must be familiar with Python inbuilt functions involving combinatorics, permutations and string functionalities too. It can prove to be very beneficial 😉
  5. This tip is more of a personal experience. In one of the test, I was getting only a score of 25. I soon realized that the for loop conditions weren’t true, and I was simply printing 0. When I corrected it, I got a score of 75. Yes! So I had to basically see that if I am getting a WA in some test case, I need to print 0 there. Finally, I used binary search on the values of variables(size of array, first element of array) to identify those test cases, and simply print 0. Basically what I did was used an infinite while loop with some condition like 100<n and n<500 so that I get the verdict TLE, and I am able to figure out those test cases where I was getting WA.

Tips for interviews:

  1. Be humble. Don’t give the slightest vibes of overconfidence or arrogance.
  2. Never give up. If the problem asked seems difficult at first sight, don’t lose out confidence. See what is given, what you have to find, and try doing it for small test cases. Then maybe you will find a pattern.
  3. Speak as you think. Don’t just keep scribbling on paper. Let the interviewer know about how you are approaching the problem.
  4. If the problem seems difficult, give the brute force solution and its complexity. Then try optimizing it, maybe using dynamic programming or some greedy solution.

Don’t think you don’t have time 😀

Just start doing already! Feel free to write your queries, I am always there to help 🙂

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!