Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3485. Longest Common Prefix of K Strings After Removal
For each index i, compute the maximum length L such that some prefix of length L appears in at least k strings (counting duplicates) among the array after removing words[i] (return 0 if fewer than k strings remain). The core challenge is to aggregate prefix occurrence counts across all strings and answer these per-index exclusion queries efficiently.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.