This is a long long story (pun intended). I repeat, it's a story. Not a fundae post. Not a GeeksForGeeks Interview Experience. This post contains links to some great KGPians I have seen. For giving fundae, they are way more qualified than I am.

You can binary search for topics of your interest from the headings.

Context

CDC stands for Career Development Centre. It is the so-called training and placement cell of IIT Kharagpur, my college. CP refers to Competitive Programming in the rest of the blog. At KGP, we have to do a mandatory internship at the end of 3rd year. The companies make the selections for the same at the beginning of the 3rd year.

Update: My CGPA is kinda high in KGP context (at the end of the 4th semester, it is 9.74).

Warning again: Don't see this as a fundae post.

Few traits of me

If you follow my blog, we should know that I am not a CP guy. In a college, where doing CP, irrespective of the branch, is a norm, it kinda feels awkward sometimes. It is not that I hate CP. I respect it as a sport. Having said that, I’m not too fond of it as well :-)

I am more inclined towards Open Source Development and designing systems. But, in India, to get a Software Developer job, your "problem-solving skills" and "data structure and algorithms" must be strong. In other words, you must be good at CP.

Naturally, I was scared as hell about CDC, starting from my 2nd year itself. But, being a very very lazy person when it comes to CP, I did not invest time in it.

Preparation for the inevitable

In March, the college got locked down, and I came home. That was the start of a LOOONG vacation.

I thought maybe this is a good opportunity to start working on my CP skills since CDC would occur anyway. So I ventured out. I started solving virtual contests in Codeforces. I started doing Data Structure questions in LeetCode as well. I remember giving one or two long challenges in Codechef as well (I was just a few hundred points short of achieving 4 stars, you know).

Around this time, Grimoire of Code took an initiative of assigning mentors for CP. My mentors were Rakesh Malaviya and Mayank Agarwal. I started following their advice and solved a few questions of Disjoint Set Union and Binary Search. Then I learnt the topic of Segment Trees. But then the proceedings in the group came to a halt (sad, isn't it?)

At this time, I contacted some of my seniors in KOSS. At KOSS, we share a common implicit disinterest in CP. (Well, many of us. Some of us are damn good at it.)

I contacted Yash Sharma, who cracked Google Mountain View Internship when we were about to leave college. I got to know that there is a significant difference in the questions asked in companies in the US and India. US companies focus on LeetCode-ish problems, whereas Indian companies focus more on Codeforces and Codechef. The number of LeetCode questions he solved was an order of magnitude higher than what I had, which was quite intimidating.

I also contacted Ritik Kumar, who got a pre-placement offer in Microsoft through CDC. I talked about my failing conditions in CP, and he motivated me to work hard. From his advice, I started solving the A2OJ C Ladder questions (solved 10-15, not many you see).

I also took fundae from countless seniors. I am sorry if I forgot to mention some of them.

The other side of the coin

If you think I want to mean I did CP religiously for CDC reasons and got better at it in the vacation, you are in the wrong. This is my story, and things won't happen as the general notion in KGP suggests.

I started looking into GSoC. I chose Ceph as my organization. Although I was late, I worked diligently to get in. But I was rejected. And it still hurts to this day.

I was getting pretty bored of spending my days in leisure or in CP only. So I approached Prof. Mainack Mondal for a project in the Security and Privacy field. Around April, we started looking into two topics together, and then the days kinda went flying by.

Having said this, to be completely honest, I wasn't spending all of my working hours to work on the project or on CP. I was learning new stuff as well as completing the pending coursework. I must thank sir here for being patient with me (he still is patient). One of the topics that we looked into came to a halt due to lack of public data, after 3 months of a wild goose chase. That's another story!

I also tried my hands in learning to hack. I solved 3 easy HackTheBox boxes. But then the boxes become considerably more challenging, and I stopped for the lack of time.

It was around mid-April to May, when the final lab tests and project submissions were happening, that IQPS came out as my software engineering term project. It became the star of my resume. At MetaKGP, I started the process of deploying it with Shivam Kumar Jha. (Although he is a senior, I said "deploying with" not "working under". This is because he doesn't let me feel inferior, although I really am)

After that, I completed the Deep Learning Specialisation in Coursera. I also completed the Google Foobar challenge during this period.

From KOSS, we started developing the KWoC website. For that, I learnt basic Golang.

I took up another project under the Center for Excellence of Artificial Intelligence, under Gaurav Suryawanshi. It started as yet another quick backend job. But it quickly escalated to a complicated Full Stack Job. Plus I learnt a thing or two about team management.

Also, I was watching a lot of Anime and Netflix.

So, you see, I had many things on my plate.

InterviewBit to rescue

Time is a river. The approaching dates of CDC soon raised a red flag in my head. I still didn't have a thorough revision of my Algorithms-I course. Plus the CP thing wasn't taking me anywhere.

I talked with Rohith Reddy, who works at Salesforce now, and with whom I work under Prof. Mainack Mondal. He told me that I should have enough capability to solve Codeforces A-D (which I will never have). It is he who suggested me to work my way through InterviewBit religiously.

InterviewBit actually doesn't need any promotion. It is hands-down the best site for Algorithms review.

I started solving it. But I am an atheist, you know. I solved only 1-2 problems from each category.

By the end of my prep, I was around the 80-90th position in my batch in the institute (pretty bad, right!)

Around the time when I was near Trees in InterviewBit (maybe a little earlier), Grimoire of Code came up with mock CDC coding tests. It's a brilliant effort. But it was a confidence breaker. While I could barely solve 1 or 2 questions, I saw CP masters of our batch like Hardik Aggarwal (incoming Sprinklr intern), Debajyoti Dasgupta (well, his CDC game is next year) and others doing all 6 in the given time.

On a personal note, the only good thing that happened to me in my college-life had been me getting a Department Change to Computer Science and Engineering. Else, it is just a story of continuous rejections. Grimoire of Code's series added to that. I was quite ready to accept the fact I might not even get a single intern through CDC. I did not let my parents know what I was going through; otherwise, they would get tensed unnecessarily.

Coding tests begin

I registered for MFTP, which is relays notices from CDC noticeboard to my email. Around August, my mailbox started to fill up CDC notices, reminding me to register and prepare my resume there.

I had to redo my resume in the CDC portal. And it is a horrible experience! They use a stripped-down version of CKEditor, with important stuff like bullets turned off. I tried to hack around, got the full Editor, but finally couldn't get the features working in the backend. Then came the even more horrible part of uploading documents for each little thing I mentioned in my resume. It's a pure pain in this COVID situation.

However, I did what I needed to do. I was mentally preparing myself to survive failures and to see my friends tagging each other with "#Machaya", "#SummerSorted" posts.

I started emailing professors in the security field around the world asking if they would let me do an internship for the coming summer. I even got lucky twice (well 1.5 times to be precise) with 2 US universities. Thanks to the tips given by our venerable senior Sayan Sinha (incoming PhD in Georgia Tech) But then all of these got on hold.

I think, owing to the COVID situations, the tests were easier compared to other years. But the webcam proctoring was quite a new thing.

The first test was of Google. I was couldn't even complete one question. Then companies started flooding in. Codings tests and Pre-placement talks started happening day in and day out.

I even got sick for one day, due to which I had to lose the test of Sprinklr and Nutanix.

After each test, I used to call two of my very close friends, Sagnik Roy (incoming Microsoft intern) and Mukul Mehta (incoming Oracle intern), and we used to discuss the solutions. Most of the times, they used to solve more than I did. Needless to say, it added to my pressure.

Besides DE Shaw, I appeared for tests in Quadeye, Microsoft, Nvidia, JPMC, Oracle, Uber and many others. I used to solve around 75% of each of the tests, which left me in a hanging position regarding shortlistings.

I used Python for my tests. Python gives much more ease of use than C++. If you know the standard library in Python well, you can write short and efficient code without needing to remember much boilerplate.

Having said that, Microsoft really betrayed Python users. The questions were simple enough. There was a question on median finding. Sagnik and I both implemented an $O(n \cdot lg(n))$ solution. His C++ solution passed. My Python solution did not. It was not even due to time limits.

When the hell are you going to talk about DE Shaw?

DE Shaw came to give a pre-placement talk for our campus. I was instantly in love with the vibe of the company. I liked what it does. I liked how the employees were enthusiastic about their work. They also promised a good stipend. After the PPT, I was quite sure I wanted to go there.

The coding test happened after the terrible Google test. I was at the nadir of confidence.

Guess what; the test went well.

There were 3 questions:

I partially solved the third one, but fully solved the other two.

As said by seniors, I was really hoping to get shortlisted.

The D-Day

On 4th September, the shortlists for Day 1 came out. I was thrilled to see myself getting shortlisted for DE Shaw and Quadeye. At the same time, I was a little disappointed for not getting selected in Microsoft and Uber.

I shaved my beard and took out my best formals. The stage was set. Interviews would start at 7 am. I placed DE Shaw over Quadeye in my preference.

Laying down in my bed after dinner, I started reading up C++ internals, for example, how do virtual functions, constructors etc. work, as these were some of the key questions DE Shaw is known to ask.

I slept really tensed. I woke up the next day at 6 am. I got ready. My interview was scheduled at 7 am sharp.

I was greeted by two interviewers. The interview was on Hackerrank Codepair. They started asking about my projects, which I explained with all my heart.

Then they asked me to rate my abilities in Python and C++. I said that if Python is 5, C++ is 3. So they started a rapid-fire of Python internal questions. I mostly answered them confidently. Then they switched to C++. I was not so confident about my answers. But, on the prompt of my interviewer, I tried to answer the unknowns with what seemed sane to me as a language designer.

We were short on time, so the interviewer then gave me a quick algorithms based question. In a gist, it was about partitioning a set of integers into $n$ partitions such that the sum of the absolute difference of the sum of the integers in pairs of such partition is the minimum possible. I was a little intimidated by it. I came up with a Recursive Brute force solution and was trying to optimize it using memoization. But the interviewer did not like the approach. He hinted towards a greedy solution. But I could not figure it out. Since we were running out of time, he said that it was okay, and asked if I had any questions. I asked about their tech stack, which they said was mostly in Python. Thus ended the first round. The full duration of the interview was around 1 hour.

After this, I was in a great mental dilemma about whether I would proceed to the next round or not. Luckily I did! The next round was an hour later. I took a cup of coffee and prepared myself.

The next round was again on Codepair. This time also I was asked a lot of questions on Python internals.

Then one of the two interviewers asked me the Longest Increasing Subsequence problem. I gave him the Dynamic Programming based $O(n ^ 2)$ solution. Then I was asked to improve it further. My mind was stuck on the DP approach of doing it, and I forgot the $O(n \cdot lg(n))$ solution since it was not very trivial to remember. I tried a stack-based solution, but it was bound to fail.

The interviewer then told me to code up the DP solution, which I did in C++. We ran a testcase to see if it was working or not.

After this, another interviewer took over. I had previously mentioned I know SQL basics. So he gave me a schema of an E-commerce site and told me to fetch all those products that have not been purchased ever. I came up with a straight-forward solution using nested queries, but he didn't like it. I tried using outer joins, but I messed it up a bit. Then he asked me about the difference between Left and Right Outer Joins.

And that was the end of the second round.

I don't remember the exact rounds in which they were asked, but here are some of the Python concepts that I was asked:

The hardest part... waiting for results

The second round also took about an hour. Then started my awful hours of waiting.

I must thank here Amritash Bharadwaj, our Point of Contact, for bearing with my incessant queries.

I also gave one round of Quadeye interview but was barred from moving forward.

Finally, after a long wait, the results came out around midnight.

I was very happy to see my name on the list. My family seemed even happier.

Before this, I was of the opinion that given a chance, I would go for a foreign university. After the offer, I am reconsidering, xD.

I do not have rights to the image

Conclusion

Here are a few of the things I want to tell the people who will be in my position next year:

  1. CP is overrated. At least for internships. For bagging a FAANG offer, it is an absolute necessity. Apart from that, a decent knowledge of basic data structures and algorithms suffices.
  2. If you love something, keep doing that. There will be companies offering based on your strong points alone.
  3. To people doing CP only: do explore other avenues. Building a software is way more fun than getting a solution accepted.
  4. To people doing Software Development only: Focus a little more on DSA. Trust me; it will take your system design skills to the next level.
  5. Finally, whatever happens, be resilient and don't lose hope.
  6. Talk to your peers, seniors and family. You are not alone in this.