HackTheRounds Interview Experiences

Meta Software Engineer Full Loop Interview Experience (2026) - Largest Square, Leaderboard Scale-Up & AI Coding, Offer

Meta E5 SWE full loop with the new AI Coding round: OA plus onsite with Largest Square 2D DP, 10x leaderboard scaling system design, and a stream top N keywords

By Anonymous ยท 2026-03-17

Background

Five years ago I told myself I would never interview at Meta. Then a former coworker reached out saying her team had a rec and the work sounded genuinely good, so here I am writing up the loop I swore I would skip. I had about 6 years of backend / platform experience coming in, mostly Python and a little Go, and I applied mid-February 2026. What surprised me most was not the coding difficulty. It was how heavily Meta now weighs the AI Coding round. If that part of your stack is rusty you will struggle.

Timeline

Format

This is a different shape than the older 2-coding-plus-1-system-design loop that writeups from 2023 talk about. Meta is using a dedicated AI Coding round now and it is not optional for most generalist product/infra roles.

Online Assessment

The algorithm problems were a sliding window on arrays and a BFS on an implicit grid, both firmly in LeetCode medium range. I finished the pair in 42 minutes out of the 75 budget. What threw me was the third item, a short "describe how you would implement rate limiting for a posting service" paragraph answer. It was scored but the weight was not disclosed. I wrote roughly 150 words discussing token bucket vs sliding window counter, shared Redis state, and what happens if a shard dies. No code.

Onsite Round 1: Behavioral (45 min)

The interviewer opened the doc directly to my resume and asked "which project on here was the hardest, and why?" I picked a pipeline rewrite where our batch throughput was falling behind traffic and we had to re-architect from a single-threaded Python consumer to a sharded worker pool plus async I/O. She drilled on two specific things:

  1. What did you try that did not work? I admitted we first tried vertical scaling, got a 2x and still hit the wall, then tried threads which hurt because of GIL contention on our JSON decode. We only went to multi-process after eliminating both.
  2. When you moved to workers, how did you decide on 16 as the shard count? I said load tests at 8, 16, 32. At 32 the postgres connection pool saturated. 16 was the knee.

The pattern Meta wants in behavioral is tradeoff-awareness, not heroics. Every answer I gave had an explicit "here is what I chose and here is what I gave up." The interviewer asked for three different project angles in 30 minutes so pace matters. No single story should fill more than 10 minutes.

Onsite Round 2: Coding โ€” Largest Square of 1s in a Binary Matrix

Problem: Given a 2D matrix of 0s and 1s, find the side length of the largest square submatrix that contains only 1s.

Classic 2D DP. I sketched on the whiteboard first: let dp[i][j] be the side length of the largest all-1 square whose bottom-right corner is at (i, j) . Transition is 0 when the cell is 0, otherwise one plus the min of the three neighbors up, left, and diagonal.

I coded the straightforward O(m n) time, O(m n) space version, tested it on a small 3x3 example by hand, then did a quick "can we do it in O(n) space" pass using a rolling row. The interviewer liked that I called out the tradeoff but let me leave the O(m n) version in since it was easier to reason about.

The follow-up he actually pushed on was boundary handling: what if i == 0 or j == 0 . I special-cased the first row and first column by copying the matrix value directly, which is the cleanest answer. He asked me to re-run the trace verbally with a 1x1 matrix of value 1 and then a 1x5 matrix to prove the edges behaved.

Onsite Round 3: System Design โ€” Scale a Leaderboard Service 10x

Problem: We have an existing gaming leaderboard service. It serves about 50k QPS today with acceptable latency but we expect traffic to grow 10x in the next two quarters. Walk through how you would evolve the system.

Meta's system design round is open-ended by design. The interviewer does not want a fresh greenfield whiteboard; he wants to see how you diagnose bottlenecks.

My structure:

  1. Measure first. What does the current system look like? I asked and he said "single primary postgres with read replicas, a redis cache in front of the top-100 query, monolithic app servers." Good, now I had targets.
  2. Read side. At 500k QPS the cache is the hot path. I'd move from a single redis to a sharded cluster keyed by leaderboard_id, with consistent hashing and a local in-process LRU in front to absorb hot-key spikes.
  3. Write side. Score updates right now probably go straight through to postgres. At 10x that kills the primary. Introduce a write-buffer: updates land in Kafka, a Flink job aggregates per-user scores in 1-second windows, then flushes to postgres and invalidates the cache entry. Tradeoff: stale reads for up to a second. He asked what kinds of games tolerate that and I listed most casual leaderboards; tournament scoring would need a different path.
  4. Top-K computation. The top-N query at scale can't scan the table. Redis sorted sets per leaderboard, maintained incrementally on each flush. ZRANGE is O(log N + M) which is cheap.
  5. Failover. When the Kafka flusher dies, scores still flow into the topic, we just lag on reads. When the cache shard dies, we serve stale from the local LRU and re-populate lazily. No user-visible 5xx.

He spent the last 10 minutes on one question: how does a shard rebalance affect in-flight reads? I walked through consistent hashing plus a short dual-read window while the new shard warms. That was apparently the answer he wanted.

Practice it: [[problem/76?company=2|Design Gaming Leaderboard]]

Onsite Round 4: AI Coding โ€” Top-N Keywords from a Text Stream

This was the round I was most nervous about and it turned out to be the one I enjoyed most. The setup: you get a scaffolded Python file with a process stream(chunks) function that receives an iterator of text chunks. You need to return the top-N keywords across the entire stream, where "keyword" is anything after tokenization with stopword removal.

What made it feel like an "AI Coding" round and not a classic coding round:

  • The problem description was deliberately loose. I had to clarify what "keyword" meant, whether I could assume all text was English, and whether stopwords were provided. The interviewer said "pretend Claude gave you this prompt, what would you ask to disambiguate?"
  • Halfway through, the interviewer pasted in a synthetic 10MB chunk and asked me to predict whether my code would OOM. I had to reason about memory without running anything.
  • The follow-up was to turn my solution into a streaming version that processed chunks without loading the whole corpus. This is where Python's iterator tools earned their keep.

My approach: tokenize each chunk with a simple regex and lowercase, filter stopwords, accumulate counts into a Counter , and at the end return the top N via heapq.nlargest on the counter's items.

O(total tokens) time. Memory is O(distinct tokens) which, for natural language, is bounded by Zipf around a few hundred thousand for most corpora. I called this out explicitly.

Follow-up: handle a truly unbounded stream where distinct-token count also grows without bound. I switched to a Count-Min Sketch for frequency estimation plus a bounded top-K heap. The interviewer liked that the answer was "approximate but bounded memory" rather than "exact but blow up."

The other thing that felt distinctly AI Coding: the interviewer cared that my code was readable to a model. Short functions, descriptive names, no clever one-liners. He said "I want to be able to paste this into a review bot and have it explain itself."

Practice it: [[problem/55?company=2|Top K Frequent Elements]]

Result

Recruiter called the following Tuesday. E5 offer. The team match took another week and I picked a platform team I had specifically asked for during the loop. Comp landed within 3% of the levels.fyi median.

Tips

  1. Do not neglect the AI Coding round. This is the round where most candidates I talked to afterward said "I wish I had practiced that format." Write five or six small programs end-to-end against a deliberately ambiguous spec, then ask yourself how a coding agent would read your solution. Verbosity is your friend.
  2. Meta's System Design now assumes an existing system. Nobody hands you a blank page any more. Practice "we have this architecture, scale it 10x" starting from a realistic baseline, not "design Instagram from zero." The scale-up variant is what they actually ask.
  3. For 2D DP, always sketch the recurrence on paper before touching code. The interviewer cares whether you derived the formula or memorized it. Walking through `dp[i][j] = min(top, left, diagonal) + 1` with a hand-drawn matrix is worth 5 points.
  4. In behavioral, frame every answer around the tradeoff you made. Meta's rubric explicitly weights calibration. An answer that says "we chose X because Y, giving up Z" beats a heroic narrative every time.
  5. Ask about load and latency baselines in system design. If the interviewer says "50k QPS today, scaling to 500k," you have the constraints you need to justify every component. If you guess the baseline, your design is unmoored.
  6. Know what your code does at streaming limits. Every Meta coding round I did this cycle had a "what happens at 10M input items" follow-up. If you cannot reason about your own code's memory and throughput without running it, fix that gap before the loop.

Meta's loop is faster and more interconnected than I remembered. The AI Coding round alone changed how I prep for every company now.