InterviewLegend

Streams, Dedup & Sampling

Alex Chen55 min readUpdated 18 real interview reports

Stream problems were a big part of Perplexity's phone screens before the file system took over. The input is too big for memory and its length is unknown, so you keep a little state and update it as each piece arrives. The filtering problems come from the product, which cleans retrieved pages and streams answers while the model is still writing, and the coding versions add a twist at the chunk boundaries.

Sampling is the other half. One version followed the sampler with a second part asking you to show it's fair. Randomness rules out a plain unit test, so you count how often each item gets picked instead.

The last problem came from a data scientist screen. It's included here because it's the same job on a table that fits in memory, and it uses the same habit of keeping a small amount of state per group.

PerplexityPremium lesson · Coding round

The 5 Perplexity problems are below.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. A Premium questionCoding · Medium

+ 2 more in this lesson

Each with hints, the follow-up and a tested solution.

Get the Perplexity questions

$49 a year · all 100 companies · cancel anytime

From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.

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

Know what Perplexity asks before you walk in.

21 coding · 3 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

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