Amay Varma
12 min readDec 7, 2021

Written as a part of CodeClub, IIT Kharagpur’s CDC compendium.

Hey, I’m Amay, a fourth-year undergraduate studying Mathematics and Computing. I’ll be interning at AlphaGrep Securities in the summer of 2022. I believe this blog post would be most useful for people who want to grab a software development internship, are from the circuital departments, and want to start early because they don’t want to rely on genetic talent at algorithmic problem-solving.

Pre-preparation pointers:

I knew very early on that since I am from a circuital department I would have plenty of opportunities in the software industry. I contacted seniors and found out three important pieces of information:

  • Most companies that visit KGP during the internship drive come for a software profile.
  • Most software profile companies open for CS/EE/EC/MA
  • The difficult part of getting a software development internship is clearing the coding round and beating the competition amongst all the other circuital folk

After analyzing these three points, my overly optimizing mind decided that since programming wasn’t repulsive and opportunity was abundant all I had to do was overcome the third point, i.e. clear these coding tests and I would be sailing through.

Preparation:

A senior 17EC Kshitij helped me a lot and guided me to begin the Div. 2A Codeforces ladder on https://a2oj.com/Ladders.html. I was very sporadic in my problem-solving and lacked consistency and discipline. I had a lot of trouble getting my codes to work and run because I lacked basic algorithmic background.

Tip in hindsight: Learn about concepts like — Time complexity, space complexity, arrays, and basic C++ before starting on your competitive programming journey. This will make your transition much smoother. Make sure you look at other people’s code and see how they do the same thing you do to learn implementation tricks throughout your journey to becoming proficient at programming.

After the first 50 Div. 2A problems, I moved to the Div. 2B ladder. I started giving contests on CodeForces then and was around pupil level when lockdown hit. I hit 1600 (Expert) by the end of March and started solving the Div. 2C ladder. This is the stage when I think it is really crucial to learn as much as possible about C++ STL, Graph Theory and Dynamic Programming to take your abilities to a higher level. I think CP-Algorithms is a great source for articles on Graph Theory. After reading DP theory from any online source, solving TopCoder Div 1. Easy problems on DP solidified my understanding of how a DP solution looks like and how to construct them. (You could use other resources)

As the COVID summer progressed, I realized that my growth was slower than my peers and that was perfectly okay, all I needed to do was take advantage of my early start by spending extra hours to see more problems and activate pattern recognition more than relying on my creative thinking to tackle new problems. I worked on my implementation and gave the GoC contests for the CDC batch of 2020. These contests along with the CDC experience of my B.Tech batchies gave me a good idea of what level the problems of the coding tests are and how much harder I need to work to reach that point of competence.

Tip in hindsight: If you are a five year (dual degree), make sure (if you can) to give the GoC contests and live through the CDC experience with your four-year batchies to get a grasp of exactly what kind of problems companies ask and how it differs from say, Codeforces contests. If you are a four year, then this step is harder — but you can try and absorb as much as possible from a senior’s CDC experience the year prior.

I then hit Candidate Master in September and started giving Google Kick Start rounds, (you should also give the Facebook Hacker Cup competitions). I continued giving Codeforces contests regularly along with Atcoder contests. I think these two websites are more than sufficient for your competitive programming growth.

I finally furnished my preparation with InterviewBit and LeetCode along with previous year placement question documents. I tried to overcome reliance on creative thinking by seeing as many problems as I could and developing patterns along with having clean implementation by looking at other people’s code on Codeforces and incorporating tricks they used.

Tip in hindsight: No matter how good you are, I think InterviewBit is essential as the concepts used in those problems appear constantly in company questions and to come up with some of the solutions from scratch might be hard in the actual coding round.

Extra nugget: Since I had to compensate for my lack of genetic ability, I decided to devote extra time to competitive programming and algorithms, thereby not trying for / doing any intern in my first, second and third-year. However, my lack of a CV didn’t impact me negatively in any way during the hiring process.

Disclaimer:

This risk pays greater dividends for Day 1 and Day 2 companies, but as you progress into the later days, your CV will become an increasingly relevant factor in your selection.

Coding rounds:

After a decent amount of Codeforces, one develops a skill of predicting how difficult a problem is in terms of its numerical rating.

Using this rather useless and weird ability of mine, I will list out company names and problem difficulties in 2021 for the tests I gave via the Codeforces rating metric.

Format/Syntax:

Company Name — No.of Problems — Lower Limit — Upper Limit

For some companies, I’ve simply stated the ratings of all problems instead of the limiting bounds.

Microsoft — 2–1000–1100

Google —2 picked from a bank of 5–1700–2200

D.E. Shaw — 3–1200–1700

Tower Research — 3–1200–1500

Rubrik — 1 + 3–1900–2000 (one trivial problem)

AlphaGrep — 3–1600–1800

Salesforce — 3–1400–1600

Adobe — 2–1100–1800

Intuit R1–3–1200–1300

Intuit R2–2–1100–1600

Wells Fargo — 2–1500–1600

APT SDE — 3–1600–1800

Uber — 3–1100–1800–1900

Nutanix — 2–1800–1900

Sprinklr — 3–1500–2000

Goldman Sachs — 3–1200–1200–2300

NK Securities — 2–1100–2100

Instabase — 3–1400–2100

ABInBev — 2–1100–1300

The rest either didn’t ask DSA questions or I didn’t give them.

Some companies also ask core CS and or mathematical/analytical ability questions in the form of MCQs.

The average test duration was around 75 minutes. Most tests had video camera proctoring and no tab changing. Partial marks were given for the number of test cases passed for a problem.

I noticed compared to previous years, this year benefited students who had been practising competitive programming compared to simply doing InterviewBit. There were several problems throughout tests that could not be solved if you only did InterviewBit (even if you completed it many times over).

A very important and understated component of cracking coding rounds is maintaining your calm and ensuring you make critical decisions correctly during the test. Should you try for a full AC and risk ending up with a complete WA or should you try for a partially working position to salvage some points? Should you switch over or debug this buggy code? Should you have a clearer picture of the algorithm or begin coding immediately? Managing stress associated with the stakes of the eliminatory nature of the test is very important and imperative to make the correct choices.

Understanding the platform can also be crucial to making a shortlist. Something silly like switching over programming languages because you didn’t realize you were on RUBY the entire time only to end up losing your entire code 75 minutes into the contest could be deadly.

Some of these things you can practise by giving contests on competitive programming websites, but some are exclusive to the CDC / job hunting process. It’s important to keep the things of the latter kind in mind (Rhyme unintended) just before your coding round phase.

After the coding rounds, I was shortlisted for Microsoft, Tower Research, Rubrik, D.E. Shaw, APT Portfolios, AlphaGrep Quant and SDE, Sprinklr, and NK Securities on Day 1.

Due to something rather unfortunate, I was involved in a controversy where although I didn’t directly do anything wrong, I was in the wrong place at the wrong time. As punishment, I was debarred from the first five companies in the list above and faced great mental stress at this loss.

There will most probably come a time in your CDC journey where your mind and spirit will be tested. I knew I had to overcome my perceived lack of genetic ability by hard work / starting early and I had exclusively invested in academics/coding as career progression since my first year to prepare for these tests. I had finally achieved it, but right before I laid the final brick to what I had imagined for so long, it felt like everything was burning and all of it would amount to nothing.

If and when your time comes and you are tested, make sure to be in touch with your family and your close friends. Make sure you believe in yourself and what destiny has in store for you.

If you spiral into a loop of negativity, you will not be able to perform to your full potential. This was a big factor that contributed to my poor performance in the Nutanix debugging round. If you can manage to keep things together when the going gets tough, you will shine through and perform significantly better than your stressed-out competition. I believe CDC Internships are 50% preparation, and 20% mental strength when you realise it’s 30% chance.

I was finally allowed to give the interviews of AlphaGrep, Sprinklr, and NK Securities.

Interview stage:

AlphaGrep round 1:

The first interviewer asked me some basic algorithmic problems to start off with. The first question was, given an array that is almost sorted wherein only a few elements were displaced from their sorted position and even their displacements were not too far from the correct position what sorting algorithm would you prefer? The second question was about merging sorted linked lists. He then moved on to specifics about STL in C++ and asked me about the differences between unordered_maps and maps. He asked me about how they’re implemented in C++. He then shared a CodePair link where he asked me to code the vector class. I coded various functions and then had a detailed discussion on what would happen when one would push_back an element resulting in the Vector object’s size exceeding the maximum size of the vector. We had some discussions about heap memory, stack memory, and memory leakages

AlphaGrep round 2:

The second interviewer asked me about virtual functions, (definition, internal implementation in C++, etc. ), smart pointers, STL containers, and then some algorithmic problems with a dive into graph theory. He asked me about minimum-spanning tree algorithms like Prim’s and Kruskal’s algorithms. He asked me to write the pseudo code of Kruskal’s algorithm. He asked me the time and space complexity of the algorithm. He then asked me about Prim’s algorithm and its implementation. I told him about how I’d do it with a min-heap but he asked me if I could do better than that by augmenting the nodes of the graph with some data. I came up with something during which it seemed like he wanted to change the topic, and so we did.

We went on to a CodePair website where he asked me to implement a Circular Linked List which had a read and write pointer. I wasn’t really used to the kind of structure he wanted me to implement (it’s taught commonly in any Operating Systems course to give an example of when multithreading without mutual exclusion can go wrong) so it took me a lot of time to figure out what kind of functionality he desired. Slowly after a long discussion (the overall interview took me more than an hour), I managed to come up with what he wanted. We had a brief discussion about what would happen if two different write pointers accessed the write function at the exact same time. He said that it was related to an Operating Systems concept and even though I hadn’t learned it he asked me what I’d do to resolve this conflict with the theory I knew. After I came up with something, he asked me if I had any questions for him, what my preference of companies was and how I am like as a person.

Tip in hindsight: For HFT firms, ensure you prepare Object-Oriented Programming concepts very well. Make sure that if you’ve taken Operating Systems you know your stuff since I am sure if I had the course I would’ve been asked several questions on it. I don’t think stellar algorithmic ability or knowledge is required. Be sure to communicate frequently. An interviewer will likely guide you to where you should look if you speak out your thoughts with detail and clarity.

Sprinklr Round 1:

The first question he asked me about was hashing. He asked me about how an unordered map is implemented in STL. He then grilled me about various kinds of hashing. He said that if we use a linked list style of chaining to deal with collisions, how would we fix the potential problem of the HashMap being heavily chained? I couldn’t come up with a good way that didn’t involve balanced binary trees or something different from linked lists.

He then asked me why bitwise XOR is preferred as a hashing function compared to bitwise AND or bitwise OR.

We then moved to algorithms.

He asked me:

“Given a string, what are the minimum number of insertions to convert it into a palindrome?”

I then got a call saying I’d been selected in AlphaGrep during the interview after which my mind went pretty blank. He ended the interview by asking me to define a class CopyStack that could push in O(1), print (bottom to top) in O(n), and copy in O(1).

So, s2 = s1.copy(), s2.push(3) and s2.print() would result in s1 being printed along with a 3 at the end.

Tip in hindsight: Sometimes no matter how much you communicate, your interviewer may not give you any hints or guide you. Try to keep your cool and hang in there. Also, do not pick up calls and accept offers from other companies during interviews regardless of how excited you may be.

Unsurprisingly, I didn’t sit for NK Securities after that.

Extra nugget: No interviewer asked me about my CV. They looked at it, shook their head with a sigh of pity and proceeded to take my interview with their own questions.

Random nuggets:

  • Be in touch with PlaceCom members to try to schedule and prioritize your interviews properly. Timing matters. The earlier you go to an interview, the less they’ve already hired and the more they’re looking to hire.
  • Discuss tests with your peers afterwards to find any tricks they used to crack test cases or get a better score. HackerRank/Earth is different from Codeforces and you don’t necessarily have to be fully correct to get full marks.
  • Talk to seniors, even if you’re not too close to them, just be respectful and try to reach out. If it wasn’t for the help and support of seniors including, but not limited to — 17EC Kshitij, 17MA Siddharth, 17MA Mansi, 16MA Sumit, 15CS Prajwal, who helped me immensely throughout my journey to CDC I’m quite sure I wouldn’t have made the decisions I made that led me to an optimal result.
  • 8.5+ CGPA and above doesn’t always work. Even if you can sit for tests for almost all companies, especially with the new wave of high CG seeking HFTs coupled with grade inflation, CGPA really matters. The higher the better, and it could really help your chances when the test is extremely easy and the company is forced to select only a few people. (Which happens a decent bit in the early days and almost all the time Day 2 onwards)
  • Try to get good ranks at coding competitions like Google Kick Start. (< 300 is ideal but the higher the better). Try to also clear Google CodeJam and Facebook HackerCup. If you can fill your CV with competitive programming accomplishments you don’t have to worry too much about trying for a pre-CDC internship.
  • Nothing guarantees anything. I gave the best test of my life and didn’t get shortlisted in Company X. Au contraire, I botched the test for Company Y, submitted solutions only at the very end and somehow was one of the 9 to be shortlisted. When failure hits where success was assured, stabilize yourself and move on. Try not to lament.
  • Ask somebody who is preparing for consulting profiles or other non-core non-software profiles to help you with your CV. They’re probably going to be better than you at selling yourself. I gave my raw draft to a close friend, 18EC Aneeta which had absolutely nothing, and with her skills, she managed to perform alchemy and convert the toilet-paper tier CV into old and forgotten newspaper tier.
  • I’ve been a huge follower of this blog series, and it has provided me immense value. I’d recommend reading as many CDC Chronicles as you can because even if in the worst case it provides no new information, you’ll find out names and contacts of seniors who may guide you further.

Funny tidbit:

The evening before Day 1, I realized that all the remaining students sitting for AlphaGrep had >= 8 shortlists and there could be a chance they prefer other companies. (yeah, I don’t recommend theory-crafting random bs like this). Just then AlphaGrep increased its stipend by 50% making me curse my luck since this might incentivize the others to now prefer AlphaGrep over their alternate options.

Glad it played out well in the end.

And that’s about it. Cheers, and see ya.