New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Meta
Coding Question
AI Insights
Quick Summary
Identify the minimal starting substring that uniquely distinguishes each word from the rest.
Return the resulting prefixes in the exact same order as the input list.
Optimize for large-scale inputs by avoiding pairwise string comparisons.
What This Tests
Trie data structure construction and navigation
Node frequency counting and state management
Early termination strategies during string traversal
Efficient handling of overlapping character sequences
Common Patterns
Trie
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
2.4k
/4.6k
Acceptance Rate
52.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
words =
Output
Expected