← Questions

Speed up a byte tokenizer and estimate token counts

0
PerplexityCodingLast asked Jan 2026

A coding interview question asked in Perplexity's coding round, last asked Jan 2026. It tests tokenization, performance and sampling.

You are handed a correct but slow byte-level tokenizer. First explain exactly what it does.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

What it tests

tokenization · performance · sampling

Your code and the AI tutor open when you unlock this question.