← Back
00:00

Longest-Match Tokenizer

Anthropic interview questions · Medium · Coding round · reported 14× · 6 tests

Greedily tokenize text by taking the longest vocabulary match at each position; the trap is correctly handling overlapping tokens and unknown spans.

The full question, tests and reference solution are available with a plan that includes Anthropic.

Idle