Arista Networks | 6 yrs experience

arista networks logo
arista networks
6 years
April 20, 202323 reads

Summary

I had an interview at Arista Networks for a role that involved two rounds, covering data structures & algorithms, low-level design, and system design, leveraging my 6 years of experience.

Full Experience

I went through two interview rounds at Arista Networks.

Round 1 focused on data structures and algorithms. I was given two coding problems to solve. The first was a known problem about counting numbers smaller than the current number in an array, and the second was a tree traversal problem to identify 'special' nodes based on their path from the root.

Round 2 covered design concepts. It started with a Low-Level Design (LLD) discussion where I had to detail the design of classes, interfaces, attributes, and methods, with a specific constraint of not using databases or complex data structures. I also delved into UI aspects, including API design, data models, method invocations, and how data structures would be manipulated in response to API calls. Following this, I tackled a System Design problem: designing a URL shortener with features like custom URLs, auto-generated URLs, full CRUD functionality, hit frequency statistics, and an auto-cleanup mechanism for unused URLs.

Interview Questions (4)

Q1
Numbers Smaller Than Current
Data Structures & AlgorithmsMedium

Given an array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].
Input: [8,1,2,2,3]
Output: [4,0,1,1,3]

Q2
Count Special Nodes in Tree
Data Structures & AlgorithmsMedium

A node X is said to be special if in the path from root to X there are no nodes with a value greater than X. Return the number of valid special nodes in the tree.
Example:

    3
/ \
1   4
/   / 
3 1 5
Valid nodes: 4 (3, 4, 5, 3).

Q3
Low-Level Design Discussion
System Design

I was asked to discuss Low-Level Design principles. This included detailing the design of classes, interfaces, attributes, and methods, with the constraint of not using databases or advanced data structures. Additionally, I needed to explain UI interaction, covering what kind of APIs, data models, and methods APIs would invoke, and how data structures would be manipulated upon API calls.

Q4
Design a URL Shortener
System DesignHard

I was asked to design a URL shortener system. The requirements included:

  • Support for custom user-defined short URLs (e.g., www.google.com/news/date/123/xcxcxcxc mapping to tiny/news).
  • Support for auto-generated short URLs (e.g., www.dfssss mapping to my/ab123).
  • Description of how to implement add, update, and delete functionality.
  • Tracking statistics, specifically the frequency of how many times a URL was hit.
  • An auto-cleanup mechanism for unused URLs.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!