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):
- Quick implementation & debugging (practice questions on codeforces, hackerrank, participate in contests)
- String Matching (important, KMP, Z-Algorithm, etc)
- Binary Search, Sorting, STL (sets, maps, unordered set/map, vector, sort) – very very very useful
- Data Structures: (Linked Lists, stacks, queues, BIT useful, Segment Tree – asked in Google)
- Dynamic Programming: Very important (medium level problems, all companies ask)
- Binary Trees & BST: Super important! (All companies ask this)
- DFS/BFS questions on Graphs (Dijsktra and flows are rarely asked)
- DP on Trees (yes, an important topic)
- Greedy, Backtracking: (Important, can be tricky)
- Math Concepts like Prime Sieve: Not that much important
- 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:
- Need to improve implementation, debugging skills.
- Learn the basic set of data structures and algorithms as mentioned above.
- Begin by doing all 37 problems on GeeksforGeeks under the array category.
- Move on to DP on GeeksforGeeks.
- For sets, maps I think problems on CodeForces like I mentioned above will be better.
- Cover other topics like greedy, DFS/BFS from GeeksForGeeks.
- 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.
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:
- Be fast. Don’t just keep on waiting for finding the solution.
- If stuck on a problem, proceed to next. First solve all of those that are easy.
- 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.
- You must be familiar with Python inbuilt functions involving combinatorics, permutations and string functionalities too. It can prove to be very beneficial 😉
- 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:
- Be humble. Don’t give the slightest vibes of overconfidence or arrogance.
- 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.
- Speak as you think. Don’t just keep scribbling on paper. Let the interviewer know about how you are approaching the problem.
- 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 🙂
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.