Arista Interview Experience by Apoorva Singh | Full TIme | Virtual On Campus 2020


Arista visited our campus for virtual hiring for the Software Engineer role.

Online test (90 minutes):

Three coding questions

  1. Bitmasking on IP to determine which interface will be chosen for a routing table
  2. Decrypting a given cipher (the crypto-algo was explained in the question)
  3. Determining the number of moves needed when one stick can be cut at a time and there are n sticks, only the largest stick can be selected and it will be cut down to the next largest stick's length. 

Around 15 students were shortlisted.

Interviews were over google hangouts, and links were sent by the interviewers themselves. No cliche questions, really!

Technical Interview 1 (55 minutes):

  • Introduced himself and got the right to interview. The questions were more of discussions, some open-ended.
  • Asked about processes and threads, and what the difference between them was. 
  • We discussed the global variables threads would share, and how to prevent simultaneous read-write (mutex and semaphore). He asked for the difference (which I didn't know), he went on to explain it and we decided to use a mutex.
  • 1k strings to match, in a file with >1k words. How do I efficiently design code such that I can get the top 10 frequently occurring words?
  • Continuing on the previous question, he asked me to design a hash to map words, and how would I resolve collisions 
  • We discussed what happens when a fork() is invoked, and about PCB. He asked me how can I optimize the memory usage that happens if it is assumed exec() will always get executed after the fork. I suggested selectively copying code, which he approved and we discussed copy on write.
  • Any questions for me? I asked him about his learning curve at Arista.

10 people had a second round

Technical Interview 2 (65 minutes):

  • Introduced himself, asked how my first interview was?, if I knew about Arista before applying.
  • He asked about threads and processes, the definition of a critical section, and how I would manage n-1 read threads and 1 write thread to the same global variable, we discussed counting semaphore and general rules for this situation (only read threads or only write thread accesses the critical section)
  • Implementation of malloc() to ensure quick access. We discussed using examples, I suggested a hashmap to keep track of free and used cells and pointed out some problems with the approach too. He then explained how it is actually implemented, the underlying system call, the inevitable problem of fragmentation, and under-utilization.
  • Must've asked more, I don't recall.
  • Any questions? I asked him how he knows so much, and if he knew a good part of it before joining itself. He encouraged me to keep learning and discussing.


Technical+HR Round 3 (75 minutes):

  • Told me I was doing well, explained the departments in Arista, and asked my preferences. 
  • What's your favorite subject? I said OS and we dived into the interview.
  • He asked about scheduling of processes, the various states, and how scheduling works in a uniprocessor (single-core) system. I responded with a timer-based interrupt, we then discussed how interrupts are managed and the types of interrupts.
  • We then picked up on preemption and he wrote an implementation of a semaphore onto the chat and asked me which line specifically will cause mayhem if the process got preempted after it. Took me time to point out the line, even if I immediately understood the issue, but he was patient and encouraging. He then asked me to mitigate it, which I couldn't. We discussed atomic instructions, and he suggested 'test and set' instruction for this scenario.
  • He asked me to write function prototypes (he gave a link for a shared platform for me to type the code in) to implement undo operation on a file, and he asked me to talk out loud about my assumptions. We then discussed some good design principles and OOP concepts.
  • Did you know about Arista before you applied here?
  • Any questions?  

Throughout the interview, the interviewers were up with intimidating questions, but were patient and kind, and would be very happy to hear clarifying questions. They highly encouraged a two-way discussion. I'd studied interview experiences from GeeksForGeeks before, which helped.

Result - Selected

All the best! :)

Apoorva Dinesh Singh 

CSE 2k21

Comments