Streams, Dedup & Sampling
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.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- 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.
Perplexity interview guideKnow what Perplexity asks before you walk in.
21 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.