Round 1 (Online Coding Round): The first round comprised of 3 coding questions and 15 MCQs related to basic OOPs concepts, DBMS, and OS. Sections were divided, the first section was MCQs (20min) and the second was coding(45 min).
The coding questions were as follows:
- There is a bag of different types of coins. There is an array where a[i] was the number of coins of type i. Find the minimum number of withdrawals needed to be done from the bag such that you have a minimum of 5 coins of each type. Given that, in every withdrawal, you can pick only one coin and after picking up the coin only you know about the type of coin. If it is not possible then return -1.
- I sorted the array in decreasing order and checked whether the last element is greater than 5 or not, then i calculated the sum of all the elements except the last element, and to that sum added 5 and that was the answer.
- Find the next greater number having no two consecutive 1s in the binary representation.
- I traversed from the given number and for every number checked whether it has two consecutive ones or not and returned the first number which did not have two consecutive ones.
- Reverse linked list in alternate groups of k.
- I created a function of reversing the linked list. I then traversed the linked list and created a loop till k and reversed the list and also kept a bool value for checking whether it was the first k nodes and for that saved the head and then for next k nodes made no changes and so on till NULL and returned head.
Tip: I would suggest doing practice questions Geeksforgeeks. Try to focus on solving the easy questions first in MCQs to get maximum marks.
Round 2 (Long Coding): The second round was basically the difficult part. It was a continuous coding round for around 7 hours wherein we were given a basic structure of a file system and we had to design the file system as per the requirements of the question and in the starting hours we had to design the classes and if the design impressed the mentor then only we could do the further coding of the functions. The mentors were there to help us with our doubts regarding the question. And there was a progress check-in almost every hour and students were asked to leave if the progress was not good enough.
The problem statement was:
- Create a file system which has the following functions:
- Add a file(whose full path is given) along with the directories inside which it is present.
- Append a file (Append the data of a file
- Create a linked file(hard link)
- Append linked file
- Delete link
- Move the file from one directory to another
Tip: Keep the mentor engaged by asking questions and discussing the approach while solving the question.
Round 3 (Technical Interview): This was a face to face interview. The students selected were asked questions related to their projects and basic concept questions on oops, DBMS, and OS.
I couldn’t clear the second round. Finally, there was an HR round. They selected only 1 student from our college.