Arista Networks | 6 yrs experience

Experience
6 years
Posted
20 Apr 2023
361 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.

How it went

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.

Questions asked (4)

  1. 01

    Numbers Smaller Than Current

    Data Structures & Algorithms · Medium

    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]

  2. 02

    Count Special Nodes in Tree

    Data Structures & Algorithms · Medium

    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).

  3. 03

    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.

  4. 04

    Design a URL Shortener

    System Design · Hard

    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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Arista Networks recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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