[ INFO ]category: Behavioral · Onsite difficulty: hard freq: first seen: 2024-05-23
[HARD][ONSITE]OnsiteE5Selected
$catproblem.md
I received a job offer from Meta, and here is my interview experience:
Phone Screen:
A question similar to finding K continuous sum.
Valid Word Abbreviation
Onsite Interviews:
Round 1:
Given an integer array, return the k-th largest element in the array.
Given two arrays with costs between two cities (a -> b and b -> a), return the minimum round trip cost between the two cities.
Round 2:
Given a 2D matrix with 0 and 1, where 0 is an open path and 1 is an obstacle, find the shortest path between the top-left point and the bottom-right point.
Given a binary tree with parent pointers, find the lowest common ancestor (LCA) of two given nodes.
Round 3 (Design):
Design a backend system for the latest trending hashtags from Facebook statuses. I discussed multiple design approaches with the interviewer, highlighting the pros and cons of each. I explained my chosen approach in detail, including my use of Redis sorted sets and how they are implemented and utilized.
Round 4:
Standard behavioral questions.
Additional Advice:
I strongly advise spending time on behavioral interviews if you are targeting a senior position. Prepare stories from your past experience and conduct mock interviews.
Behavioral and system design interviews are very important for leveling up.
For system design, I prepared using Alex Xu's book and other online resources.
For coding, discuss all possible solutions and explain why you chose a specific implementation.
Practice data structures and algorithms (DSA) with a stopwatch.