AnthropicCoding·55 minMembers
Coding Q6 — Longest-Match Tokenizer
Members only
Given a vocabulary mapping tokens to ids (plus a sentinel `UNK`), implement a longest-match tokenizer over a text string. The base solution is two nested loops; optimizations and follow-ups (consecuti...
SWE
MLE
string-processing
greedy
trie
python
medium
Frequency
Medium
Last asked
2026-06-26
Stage
phone-screen · onsite-coding
Log in to continue reading the full content
Comments
Sign in to join the discussion
Loading...
