Utsav Mehta
12 min readApr 11, 2023

--

Hello and Welcome to my blog. Through this blog, I will try to cover my entire CDC journey, including the preparation, tests and interview experiences.

Brief Introduction -

I am Utsav Mehta, a third year undergraduate from the Computer Science and Engineering department at IIT Kharagpur. I will be interning at Salesforce for the upcoming summers.

I was shortlisted for Alphagrep, Quantbox, Sprinklr, Nutanix, Microsoft and NK Securities ( for Day-1 ) and Salesforce, Oracle and Adobe ( for Day-2 ).

Preparation Phase -

I had started to practice competitive programming after completion of my first year, since I had a basic knowledge of C and C++ by then. I started giving contests on codechef and codeforces but couldn’t solve even a single question sometimes. This is when I started to watch tutorials on youtube to learn basic sorting algorithms, basics of number theory, a few math tricks and STL. This helped me reach a decent level and I could solve at least 2 questions in Div2 contests.

Then I started to practice topic-wise, reading articles from GeeksForGeeks on particular concepts, filtering those problems on codeforces and solving 4–5 problems from each difficulty range, which improved my performance in those topics. This continued for a few months and I stumbled upon many other resources like CP-Algorithms, AtCoder DP contest, USACO guide etc. I continued giving contests, upsolving problems, discussing different approaches with my friends, and kept practicing from these resources. My rating gradually increased alongside and this continued till my fourth semester concluded.

This is when my summer vacations started and it was just more than a couple of months for CDC to start. I started practicing from A2OJ ladders, and I solved many problems from the Div.2 C and D sections. I recommend solving these ladders to anyone who wants a better grip over Graph and DP domains. I also watched a few lectures from AlgoZenith on DP and advanced DP formulations, and practiced the same from codeforces. Finally I reached the high-range Expert level in May 2022.

This is when I started to focus on topics like DSA and OOPS. Having a good grasp over Data Structure and Algorithms through the Algorithms-1 course and solving major DSA buckets from InterviewBit boosted my confidence and taught me some tricks that I was not aware of earlier.

Object Oriented Programming was taught in the Software Engineering course, so I just had to revise those topics, and touch a few other concepts which I learnt through GFG articles.

Towards the end of preparation, I started to give contests designed by Grimoire of Code. These contests were a close fit to the coding rounds and a few questions in coding rounds came directly from the contests :). Hence it is highly recommended to participate in these contests and later evaluate your performance.

Coding Rounds -

These rounds consist mostly of medium to hard DSA problems, and require a decent level of CP practice to solve them. Some companies also focus on core CS topics like DBMS, OOPS, Networks etc, but thorough knowledge of OOPS should work for most of the companies. Speaking of individual companies –

Salesforce — Consisting of 3 coding questions, one was an easy game theory question with binary answer, one was a simple adhoc question based on observation and the last one was a medium problem that had a greedy solution and could be solved with priority queue. Overall, the test consisted of easy to medium questions and could be solved in one hour whereas two were given.

Alphagrep — One of the most time constraint coding rounds, consisted of 5 questions within 1.5 hours. Problems consisted of a basic Linked List which could be solved easily if similar questions were practiced on InterviewBit, a simple observation based interactive problem (a modified version of finding number of sinks in a directed graph), a medium-hard optimization problem which could be solved with greedy approach and priority queue based implementation, an easy-medium level problem on bitwise operations consisting of brute force solution and a problem on level sorted complete binary tree with query based key search which could be solved in O(log²N) time. I solved all of them, using some cheap tricks for the last one.

Quantbox — 2 coding questions and 14 MCQs to be solved in 1 hour and 15 mins respectively. Coding questions were difficult, I couldn’t solve the first one (it required an approximate algorithm, hence solving the problem partly could’ve given full points) and solved the second one partially (had a gcd based AC solution). MCQs consisted of various CS questions like OOPs, OS, Networks, DSA etc, where I solved only the DSA and OOPs topics (around 9/14 MCQs).

NK Securities — 2 coding questions to be solved in 70 mins followed by 10 MCQs to be solved in 30 mins. One of the coding questions was from an easy-medium range of strings and DP, with special attention on the base cases and the other was a standard question from Tree DP which I had solved earlier while practicing on this topic. MCQs were based on OOPS, probability, strategic puzzles and DSA, with negative marking. I managed to solve 8/10 MCQs and both the coding questions.

Sprinklr — Consisted of three questions to be solved in 1.5 hours. Difficulty of the questions varied from easy to medium-difficult. One question was based on sliding window technique (easy), one on finding cycles in directed graphs with additional constraints (medium-difficult) and one on partitioning a tree using modified DFS (medium). I had solved all three with very little time left on the clock.

Nutanix — 2 coding questions to be solved in 75 mins. One of them was a simple tree dp question that took around 15 mins to implement. I couldn’t solve the second one completely and managed to pass 3 test cases only. Still considering partial marking and relative performances, I was shortlisted for the interview rounds.

Microsoft — Had 2 coding problems to be solved in 80 minutes. One was a repeated problem from GOC contests on finding contiguous fragments in an array with given arithmetic mean and the other was a simple problem based on 2 arrays and prefix sums. Overall, it was an easy round with questions of level around Div2 B/C.

Summing up the coding rounds, it can be said that the questions ranged from easy to a little higher than medium (around Div2. D) ranges and time was not an issue, given we have sufficient practice.

Interviews -

Coming to the interview rounds, I will mention them in the order I appeared for interviews.

Alphagrep — I was shortlisted for both Quant and Software roles, and on being asked the preference over the roles, I preferred Quant. The interview started at 6 AM and wrapped up around 8. There were 2 rounds, both technical, the first one started with puzzles which I later discovered were from Brainstellar. I managed to solve almost all the puzzles without any hints. Then the interviewer went towards DSA problems. Initially I was asked to give my approach on how I solved the last problem of coding round (the one on level sorted complete binary tree, for which I had used cheap tricks). I tried to think of the actual solution but realized it only after Day1. Moving on, I was asked whether I was aware of how Unordered Maps and Maps were implemented in C++. Based on my answer, the interviewer proceeded to ask me more on Hashing, Collision Handling, Time Complexity of these techniques etc. This round was over by 7, at which a new panel had joined the meet for the next round.

This round began with a few more puzzles, which included probabilistic calculations and were more difficult than those asked in Round1. I could solve a few of them with hints. Then I was asked problems on OOPS — a few theoretical problems followed by a question on a virtual function table (this discussion lasted around 10–12 minutes). Following this I was asked to implement Vector Class using the concepts of OOPS while maintaining the implementation as close to the actual STL implementation. Since this was a standard interview question, I had practiced it beforehand and implemented it quite easily. This marked the end of round 2, and I was told that the result would be informed to the placement committee.

Quantbox — I was shortlisted for both Quant and Software Roles. The interview had 3 rounds and lasted from 8 to 10. The first round started with a basic introduction, followed by easy to medium level problems on Trees, the solutions to which were asked to be implemented on Google Docs. The questions were variations of standard Tree questions thus solving InterviewBit was helpful. I solved all the questions pretty quickly and advanced to the next round. This round consisted of puzzles involving strategy and observation. Some of these were taken directly from Brainstellar and I required hints for a few. This was followed by questions on OOPS, in which I had to tell the outputs of pieces of code, difference between Little and Big Endian and their identification etc. A new panel joined by this time for round 3.

The interviewer started on a light note, asking my experience till now and engaging me in conversations. Hence, I had assumed that this was a HR round, which I later realized was not the case. The interviewer then shifted to problems on OOPS, typically on multibase inheritance and virtual function tables. I was not aware of multibase inheritance by that time, but he insisted that I speak up my intuition and how I would implement it. This discussion lasted around 20–25 minutes, following which questions on stack vs heap were asked, typically which one is faster, direction of growth, why do we need two ways to store memory etc. This marked the end of round 3 and again I was informed that the result would be conveyed to the placement committee.

NK Securities — Round 1 started around 10.15 and lasted for an hour. Since I was shortlisted for both Quant and SDE, both puzzles and DSA/OOPS were asked. The interviewer directly went for puzzles without an introduction. Puzzles were around Brainstellar medium level and I could solve almost all, with a little hint here and there. Then I was asked one question on Trees, to which I provided a naive solution initially, followed by an optimization through LCA. I was asked to implement a part of the code, then the interviewer asked me how I would implement LCA. He wanted to hear both the segment tree and sparse table, but I only knew about the former. Finally I was asked to implement a Vector class in C++ following concepts of OOPS, which was an easy job as I had done it a couple of hours back.

Round 2 started around 12.15, and puzzles were asked. Puzzles were based on observations, pigeon hole principle, little game theory and ranged from medium to hard. I could only solve a couple of them and required hints in others. The round lasted for about 45 mins.

Microsoft — There was only one round for Microsoft, which started around 11.20. The interviewer was very engaging and experienced. After introduction, he went on to ask 2 DSA problems. I was asked to implement both the problems and he tested the outputs with sample and hidden test cases. One of the questions was on DP, which had a cubic time implementation and was a variation of a standard problem. The other was on Trees which again was a variation of standard problem and I solved both of them within 20 mins each, with implementation. I was informed that I was the first one to solve the DP problem on that day and the interviewer seemed quite happy with my performance.

Nutanix — The interview started around 1 PM and lasted for 40–45 minutes. The interviewer was not interested in the interview and it seemed he was completing a formality. I was given a python code on linked lists which I had to debug in 10 minutes. Since he had copy pasted the code on google docs, the indentation had messed up and I couldn’t make much progress with the code in little time. Following this he asked me a few questions on OOPS from inheritance, VFTs etc and a fairly simple question on DSA which was asked to be implemented on a google doc.

Sprinklr — One of my best interviews of the day, it started at around 2 PM. The interviewer was very friendly. After introduction, he went on to ask basic questions on sortings — types of sortings I was aware of, time complexity of each of them, average case and worst case complexity of quick sort etc. I answered all the questions pretty quickly and he seemed to be satisfied. Then he asked me about Tree traversal techniques and asked me to code Inorder traversal. This was followed by discussion on OOPS. He asked me questions like the need of OOPS, programming paradigms of it, followed by questions on specific topics like Abstract classes and Virtual Function Tables. I couldn’t answer some of the questions convincingly. He then moved towards my CV and asked me to explain both my projects. He was satisfied with my explanation and asked a few follow up questions on one of my projects. Then he went on to ask me questions on DSA. He asked me two easy-medium questions on strings. He was not able to understand my approach initially, until I showed him the dry run and coded the algorithm. Then he asked the standard question on sorting a file of 1 GB storage with only 200 MB as the processing space. This interview lasted for 2 hours and the interviewer told me that the result would be provided to the placement committee.

Salesforce — This was my first company for Day2. There were 2 rounds, one technical and one HR. First round began at 9 AM. The interviewer was friendly and composed. After introduction he gave me a problem to find the maximum of the minimum elements of all k-sized contiguous subarrays from an array of size N. I explained the brute force solution and he asked me to optimize it. After a few minutes of thought, I explained to him a solution using Dequeue, he was satisfied with the approach and asked me to code it. Initially my code failed on a few test cases and on debugging, it passed some of the failed ones. He said it was fine if I couldn’t solve all the test cases and proceeded to ask me about OOPS. He asked me to explain programming paradigms of OOPS and I was well prepared for the answer this time. He then asked me about the need for abstract classes and VFTs. He was quite satisfied with my answer and asked me to wait for the next round.

At around 10, the HR round started. After introduction, standard HR questions were asked — Why do you want to join Salesforce, Tell me a situation in which you thought out of the box etc. She went through my CV as well, and enquired about a group project, my role in it, how we resolved conflicts etc. I answered all the questions confidently and calmly and the interviewer seemed pleased with my answers. The interview lasted for around 40 minutes at the end of which I received a call stating that I was selected for Salesforce!

Some Advice and Suggestions -

  • Competitive programming plays a crucial role in the entire CDC process, starting from the coding rounds, till the interviews. I would strongly recommend starting ASAP and practicing regularly.
  • According to me, Learning new topics on the go is a better practice in competitive programming than reading all the topics beforehand and start practicing later.
  • Keep giving contests often and always attempt to upsolve the following question. This typically helps study new topics or utilize the previous ones in alternative approaches.
  • As it may be evident from the blog, thorough knowledge of Object Oriented Programming is essential for this profile. Be prepared for variants of standard questions around this topic.
  • A partial solution is preferable to none at all. In order to avoid being left hanging during interviews and coding rounds, always move forward with the best possible solution you can come up with.

Parting Words -

My parents and friends deserve my heartfelt gratitude for standing by me during trying times. I would also like to thank one of my seniors, Rohit Raj, who guided me multiple times throughout the process.

Taking this blog as an opportunity to mention — Sometimes, things may not go in the way you wanted! Having prepared so hard for an opportunity, practicing for months, performing better day by day may give you a lot of hope and confidence, but things may take unexpected turns. It’s all about gathering courage and pushing forward in times like this, letting things go, knowing it’s not the end and outshining the next time.

Thank You for giving this a read, Adiós amigos !

--

--