Commvault Interview Experience for SDE | NIT Jamshedpur
Commvault visited our campus for two roles SDE(C, C++ developers) and SDET (Python developers).
Eligibility Criteria: CGPA 7.5 and above. All branches were eligible.
Round 1: This was a 1 hour 15 minutes round. It had 20 MCQ questions and 3 coding questions. MCQ questions included questions from OOPS, DBMS, and OS.
There were three coding questions of moderate difficulty.
for n=3. Output = 3 ( 110 , 011 , 111)
We were given a string having only two characters C and D. We needed to print minimum swaps required to make C and D alternating.
Input : CCCDDD Output: 1 (CDCDCD by swapping index 1 with index 4)
I solved 2 coding questions fully and another partially. Around 25 were shortlisted after this round.
Round 2 (7 hours coding round): This round started at early 8 am with the problem statement explanation and the actual coding round started by 9:30.We were supposed to code remotely at the system provided by the commvault authority. We were monitored continuously by one of our assigned mentors. Screen sharing and webcam were on for the entire duration. Good internet connectivity is suggested as they strongly mentioned that connection should not be lost at any point in time.
Problem Statement: We needed to design a file-based storage system as we have for any other operating system. It would have folders with subfolders and files, and we were required to design this efficiently. It should perform some basic functionalities like create, delete, update, link different files, rename, create soft links, etc.
All of this was supposed to be done using OOPS (C++ or JAVA) like we had classes defined and we needed to implement those classes and their functionalities. We needed to first discuss our idea with our mentor of how we are going to implement these before actually coding these. Upon some thinking, I thought of implementing these using some pointers and recursions based mechanism to actually implement these. However, coding each of them was a huge task and took a full 7 hours. They were constantly sending people away if they were not making any progress for quite some time.
We were provided a template like CPP file with empty class names like class Directory and another class called File. We needed to implement these classes and their member functions. The main function had some basic operations written like:
- create( path, contents)
- delete( path)
- link(path1, path2)
Similar operations were written inside the main and our program should return the correct output accordingly.
- My class used the pointers to its sub-directories and files to access the children of a folder and these pointers allowed recursion based implementation and thus each operation could be implemented easily.
This was how I proceeded for this round but this surely was not the only way to implement this task. It’s all about imagination and to what extent one understood the problem statement and its requirements. A friend of mine used tries based approach for implementing this task.
At the end of this round, only 6 were shortlisted for the next technical round.
Suggestion: Be sure to pay attention to the problem explanation as they would explain each and every operation and a few corner cases that we need to consider while implementing. For this round, I would suggest not get overwhelmed by the problem statement because the tasks were designed such that with thinking and a basic understanding of OOPS one can clear this round. Using constructors and destructors would gain additional points as they focus majorly on OOPS. Patience was the key.
Round 3 (Technical Interview): This round majorly focussed on checking the basic understanding of Data Structures and Algorithms, Operating System, and DBMS. Basic questions like the comparison between C++ and Python( (as my projects included python), how a C++ and a python program compiles (important), which one would I prefer when and why etc. These were some language-specific questions that were asked. It was followed by questions related to the last coding round explaining my ideas and implementation details.
3 coding questions were asked I was made to code all of them in the editor.
Zip two arrays.
Input: arr1 = [1 , 2 , 3] arr2 = [4 ,5 , 6] Output: [1 , 4, 2 ,5 , 3 , 6]
Zip two linked lists
Input: list1 = 1->2->3 list2 = 4->5->6 Output: 1->4->2->5->3->6
After coding, I was asked questions related to threading, synchronization problem in threading, how to solve this problem, CPU scheduling algorithms, the difference between process and threads, context switching in os.
Suggestion: One should be comfortable writing bug-free code at once. Also, one needs to judge whether the interviewer is expecting the best complexity solution at once or has time to gradually reach the best one starting from brute force. Revise core CS topics and be comfortable with them as they are judged by almost every company.
Round 4 (HR Round): 3 of us reached this final HR round. There was a panel of 4 members, and they said it was going to be a quick round and as it was held quite late at night.
My first question was to explain the Snakes and ladders games and what data structure would I used to implement this. I suggested that I would use a map as I needed to store those directed edges in my data-structures. They were satisfied with this. After that, I was asked about vectors and linked lists and that whether I can implement vector using linked lists and how. After explaining I was asked about the drawbacks of this implementation.
Lastly, I was asked for a puzzle. Given three jars that were incorrectly labeled as Oranges, Mangoes, and Mixed. I was to correct the labels by picking minimum fruits from the jar. I was able to solve it after a little help.
I was among the three people that were selected for the SDE role. The 2nd round was the most interesting and engaging one where one could experience how to apply our coding skills on a day-to-day problem and implement them efficiently.