Meta Onsite

meta logo
meta
Ongoing
October 5, 202512 reads

Summary

I recently interviewed onsite at Meta for an unspecified role, going through four rounds covering data structures, algorithms, system design, and behavioral questions. I believe I performed well, coding and dry running all problems, and am now awaiting the results.

Full Experience

I had my onsite interview at Meta, which consisted of four challenging rounds.

  • Round 1 focused on data structures and algorithms. I was asked to implement the left and right view of a binary tree, and then to merge three sorted arrays while also removing any duplicate elements.
  • Round 2 was a behavioral round where I answered questions about my past experiences and how I handle various situations.
  • Round 3 was a system design interview where I had to design a system for ad recommendations.
  • Round 4 involved more coding, specifically implementing a basic calculator that handles only addition and multiplication, and then designing a data structure that supports insert, delete, update, and getRandom operations all in O(1) time.

I was able to code everything and dry-run several examples for each problem. I'm currently waiting for the final results.

Interview Questions (5)

Q1
Left View and Right View of a Binary Tree
Data Structures & AlgorithmsMedium

Given a binary tree, I had to implement algorithms to find its left view and its right view. The left view includes the nodes seen when looking from the left side, and the right view includes nodes seen when looking from the right side, typically the first node at each level.

Q2
Merge K Sorted Arrays with Duplicate Removal (K=3)
Data Structures & AlgorithmsMedium

I was given three already sorted arrays and tasked with merging them into a single sorted array. An important constraint was to remove any duplicate elements in the final merged array.

Q3
Design Ad Recommendation System
System DesignHard

I was asked to design a system that can provide relevant ad recommendations to users. This involved discussing various components like data collection, user profiling, ad selection algorithms, ranking, serving infrastructure, and considerations for scalability and latency.

Q4
Basic Calculator (Addition and Multiplication Only)
Data Structures & AlgorithmsMedium

I needed to implement a basic calculator that could evaluate an expression string involving non-negative integers, addition ('+'), and multiplication ('*') operators. The key was to correctly handle operator precedence (multiplication before addition).

Q5
Design Data Structure with O(1) Insert, Delete, Update, GetRandom
Data Structures & AlgorithmsHard

The task was to design a data structure that supports four operations—inserting an element, deleting an element, updating an existing element, and retrieving a random element—all with an average time complexity of O(1).

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!