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…