Maximum Sub Sentence Using Prefix Tree
Asked at Zip · Coding Questions · Difficulty: Medium · Last asked Jul 15, 2026
Given a text, use a prefix tree (trie) to find a sub-sentence such that it maximizes the value of `treenode.level * treenode.count`. Implement this functionality and output the result. The text is space-separated words and is case-sensitive.
Loading the problem…
More Zip interview questions
- Implement a Vending Machine with Bill Insertion and Change-Making (OOD)
- Implement an LRU Cache
- Implement Functions with AST and Find Tree Roots
- Reaching Far Along Buildings with Bricks and Ladders
- Maximum Profit from Repeated Stock Trades
- Poker Hand Combinations Generator