InterviewLegend

Design & Math

Alex Chen22 min readUpdated 1,044 real interview reports

These are the "implement this" problems. Meta hands you a class signature or a function and a complexity target, then watches you build the machine behind it. Three of them recur enough to drill on their own: a weighted a Premium question, raising a number to a power, and a least-recently-used cache. Each hides a single trick, and once you see it the code is short.

The tricks don't overlap, which is part of why Meta likes the set. A prefix-sum array turns "pick by weight" into a lookup. Halving the exponent turns a million multiplications into twenty, and a linked list bolted onto a hash map answers in constant time. Learn the move and the problem follows.

What's inside
  • 3 problems, worked step by step
  • 3 diagrams
  • about 22 min

Premium lessonMeta interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · 30-day money-back guarantee

Had your Meta interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Meta interview guide

Know what Meta asks before you walk in.

28 coding · 5 system design · 28 behavioral questions

Get Premium$49 a year · 30-day money-back guarantee
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.