ARISTA internship interview experience 2020

The whole process consisted of 2-3 rounds.
Round 1:
It was an online coding round. There were 3 questions.
1. We were given the number of nodes of tree and all the edges between different nodes, we had to construct the tree. Just like in case of binary trees where we have only 2 child nodes left and right, here there can be any number of childs (n-ary tree). we ony had to construct the tree and return the pointer to the root node.
2. we were given a list of intervals and we had to merge them. You can merge 2 intervals if there is atleast one point common in both intervals(e.g- [1,5] and [2,7] can be merged to [1,7]) or if both the interval are one after another(e.g- [1,3] and [4,6] can be merged to[1,6]) or if there is only one point such that if we include that point in one of the interval the situation can be reduced to the second type(e.g- [2,5] and [7,8] can be merged to [2,8] , [2,4] and [7,8] cannot be merged since there are 2 points 5 and 6 that don't lie in any of the interval). we had to return the final list of intervals after modification.
3. There are 10 cards every one of them have some distinct value between 1 to 10. We have to select K cards and achieve a certain sum. Whenever we select a card it is again placed in the deck and the deck is shuffled again. Only the first time, you can select a card of your choice while for the rest k-1 times a random card will be selected. Now, you have to answer which card you will choose at first so that the probability of getting an exact sum value will be maximum. K<=100

Round 2:
It was a technical interview. At first, my interview was conducted on google meet and it lasted for around an hour but i faced many technical issues due to which my interview went really bad as we were not able to communicate properly. I will mention the questions asked in that interview.
1. I have to implement a class which can store a really big integer. The class also has a function increment() which increases the value of the number by 1.
2. Then i were given 2 code snippets and i had to answer which of them are more efficient, i failed in doing so because they appeared similar to me :).
3. The interviewer wrote a program and i had to predict the output.
4. It was based on implementation of trie.

As i mentioned earlier, due to technical issues my interview was not properly conducted, So after this interview i received another call from arista and they scheduled another interview at that very moment. This time it was on zoom but the problem still persisted so finally my interview was held on a whatsapp video call :).
Obviously now, there was no platform so that i can code so most of the questions were theoretical. The questions were from my project and CS fundamentals. He asked me how can i implement a hashset for strings.
Another question was that I am given a file, and the file has some long sentences separated by '\n'. I have to return the number of distinct sentences.
An easy coding question was to check whether 2 strings are anagrams or not. Only the approach.

Few of my friends also had an HR round which was the 3rd round.
Final verdict: Selected :)

Comments (3)