Online Assessment
Questions: There were 2 sections:
- MCQs
- Coding Questions
MCQs: The MCQs were a mix of CS fundamentals, DSA, Linux, operating systems, C/C++ programming, etc. For instance, take this question:
int x = printf("hello"); switch (x) { case 1: printf("1"); break; case 2: printf("2"); break; ... // extra conditions }
This is not the exact question, but similar to this. Some questions were based on Linux as well, like how will you kill a process with a particular id, kill -9 <pid>
, but not only this there were some other syntaxes given as well.
Coding questions: There were 3 coding questions in total. They were of medium-medium to medium-hard category, but they were different for everyone. One catch: the available languages were only C/C++ and JAVA. They were as follows:
-
Given
N
chocolates, each had some parameter, say weight. On each day I can eat only one chocolate and its weight will be halved,2->1, 1->0
. I need to minimize the number of days. [PRIORITY QUEUE]Example TC: C1: 12 C2: 4 C3: 6 Answer: C1,C1,C3,C2,C1,C3,C2
-
Given a word, I need to make it lexicographically the maximum, but the condition was to make sure there are no more than
K
consecutive occurrences of the same letter. [PRIORITY QUEUE] -
Given some intervals, I needed to merge them based on some condition making sure some other metric. This was the hardest among these, but was also based on priority queue. [PRIORITY QUEUE]
Status: 2/3 Solved (1,3) and in the interview I solved the 2nd one too.
Verdict: Selected, only 10% were shortlisted (10 people if I remember correctly).
Technical Interview Round 1
Questions:
- The interviewer asked me to identify errors in a given C++ code.
- He then gave me another C++ code with passing pointer in a function and asked to fix the error.
- He asked about various states of a process.
- Difference between orphan and zombie process. I was not able to provide an example for a zombie process.
- QUESTION: Suppose there is a timeline say 100 seconds long.
main
starts at0s
, forks achild
at5s
then goes to sleep till100s
. Thechild
completes its task in25s
. Tell the states formain
andchild
process. - He gave me another code and asked to find errors in it, based on
exec
and what happens whenexec
fails. - DSA Question: In a BST find whether the sum of any path till leaf is
X
. - Articulation point: He asked if I knew what it is, and I provided the definition and an example.
Candidate's Approach
The candidate was able to identify errors in the C++ codes and provided optimal solutions for the DSA questions. However, they struggled with the zombie process explanation despite receiving hints.
Interviewer's Feedback
The interviewer noted that the coding was good but mentioned that the OS knowledge was a bit weak.
Technical Interview Round 2
Questions:
- Given
n
integers, they were unsorted andn-1
of them were consecutive. I needed to find which number was missing. - Design Question: You are given a router that needs to assign IDs to anyone who connects to it. The ID will always be >= 0. One can disconnect from the router and free the ID assigned to it. I needed to design a library, and one of its functions was to assign and free the ID in the router.
Candidate's Approach
The candidate provided a mathematical solution for the missing number and then a DSA solution using a hash map. For the design question, they clarified requirements and proposed a linked list structure to manage ID assignments.
Interviewer's Feedback
The interviewer was happy with the solutions provided and appreciated the candidate's approach to clarifying requirements.
HR Round
Questions:
- How were your interviews?
- Where do you see yourself in 5 years?
- Any plans for higher studies?
- Discussed compensation.
- The HR asked if I had some questions.
Candidate's Approach
The candidate expressed that the interviews were good and that the interviewers were humble and helpful.
Interviewer's Feedback
No feedback provided.
Extra Questions
These were asked to my batchmates:
- Design MMU
- How does garbage collector work in Java
- Other DSA questions (Leetcode style mostly)
Tips
- Focus on OS
- Do Leetcode, you never know where you will see the problem.
- Don't lose hope. I was not placed on campus for any internship, and a company that came before Arista I did not even clear the OA.
- KEEP GRINDING!!!!