Security Engineer signal: trie + prefix counts in a authorization policy engine context. This is a ProdMatch-owned security engineer drill, framed as a March 2026 Swiggy Identity simulation, not a copied platform question.
Company context
Swiggy · Identity
Freshness
March 2026
Product surface
authorization policy engine
ProdMatch interview simulation based on product-team patterns; not a claim of a real company question.
Build a prefix index for authorization policy engine. Support insert(term, weight), delete(term), and topPrefix(prefix) returning the best active term by weight then lexicographic order.
Input
Output
Constraints
Concepts
insert pay 5, insert payout 7, topPrefix pa -> payout
Try framing your own approach first. The 30 seconds you think before peeking is where learning happens.
Reveal the approach first.
Your rating tunes when this problem shows up again.