New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
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.3k
/4.3k
Acceptance Rate
53.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
words =
Output
Expected