Back to problems

Radix Cache

Object-Oriented Programming · xAI · Hard

Prefix Radix Cache Problem Overview Build a Prefix Radix Cache for storing integer sequences in a radix tree, also called a prefix tree or compressed trie. In contrast to an ordinary trie, which assigns one element to each node, this structure combines consecutive single-child links into edges that hold multiple elements. Typical applications include: Sharing prompt prefixes in LLM KV caches Longest-prefix matching in IP routing tables Indexing strings with shared beginnings…

Checking your access…