There were two rounds, and I was rejected after the second. The first round was quite basic, designed to gauge my understanding of the C language. It began with questions such as, "Explain what malloc does." Then it progressed to more detailed inquiries, like, "How would you malloc over a PCI-e?" Following that, there were terms to define and explain, such as traceroute, ifconfig, ping, wireshark, and ip. You might also be asked other basic Unix questions, such as, "What does fork do?", "What would kill -11 do?", "What does select do?", or "What will happen if I type this?"
After these questions, we moved on to some code. The first task involved two strings within the main function, similar to this:
c int main( int argc, char* argv[] ) { char* string1 = "string"; char string2[] = "string"; }
You would then be asked to modify a specific position in each string, say index 1. You might be thrown off by string1 because it is a string literal and therefore read-only; you cannot modify it. string2, in this case, would work fine.
Following this, I was asked to write a palindrome function in C. This should be easy. I was also asked to write a Python script that reads a file containing numbers separated by spaces on multiple lines. The script should treat the first number in each line as column 1, and so on. The task was to add all the numbers in column 3. This should also be easy.
Make sure you can easily write code in a command-line editor such as vi or emacs. Also, ensure you know how to compile C code and run Python scripts from the terminal. You should also have the basic knowledge of how to debug a file using gdb on the command line in case you encounter a segmentation fault.
The second round was more thorough.
I was first asked to write a stack API for a client. The client should have the freedom to add any type of data they want, whether it is 1 byte at a time or 1 MB. The interviewer gave me three requirements that had to be fulfilled, although I don't recall them precisely. As you design your API, you will be asked to demonstrate how the push and pop operations would be coded. Also, be prepared to change your design as the interviewer introduces more conditions. For this part, awareness of size_t and void * is beneficial, as they came in handy when writing the function signature.
The second hour of this interview involved comparing two version strings. Here's how the docstring for the function looked:
c /* vercmp compares two software version strings and returns the following: if v1 > v2 : return 1 if v1 == v2 : return 0 if v1 < v2 : return -1 input strings are in the form "1.0.3", "2.10", "6.0.0.3", etc... "1.0" is considered bigger than "1" */ int vercmp( char * v1, char * v2 ) {
}
I believe the only way to achieve this is to keep track of the periods in each string and compare the corresponding numbers.
Compare two version strings.
Design a stack API.
Write a palindrome function.
The following metrics were computed from 156 interview experiences for the Arista Networks Software Engineer role in United States.
Arista Networks's interview process for their Software Engineer roles in the United States is very selective, failing most engineers who go through it.
Candidates reported having very good feelings for Arista Networks's Software Engineer interview process in United States.