I was interviewd by Arista Networks few days back.
Process -
Round 1 - Online Hackerrank challenge.
Given a string "_!helloworld5678234kjlm*&!", return alphanumeric string with groups of k.
Round 2 - Onsite
Questions -
- Reverse string without any built-in library. Optimise it.
- Implement stoi.
- Find missing element in a running stream of integers. [No extra space]
- Level order traversal in binary tree. [Non-recursive approach]
Round 3 - Onsite
Questions -
- Inorder successor of node in BST.
- Find all primes less than 'n'. [Used sieve of eratosthenes]
- Really complex image representations are given in form of bits. They are represented in form of strings like "hello world" in 2-D arrays. Each character is an 8 bit grayscale pixel(black or white) that holds ASCII value of the character. Perform following operations -
a. Decode the ASCII values of characters.
b. Generate inverted representation of those characters.
c. Invert the grayscale pixels using only bitwise operations.
d. Check for palindrome on ASCII values.
- Design Uber. [Lots of constraints added in this question]
Happy LeetCoding :)
Thanks!