Summer Sale
Limited Time Deal: Unlock all premium questions for over 30% off
$10.42$7.08
14
:
03
:
45
:
39
Back to Dashboard
Prune Prefix Words
Medium
A URL shortener system maintains a keyword list. To reduce redundancy, remove every keyword that is a prefix of any other keyword in the list. A string a is a prefix of string b if b starts with a and len(a) < len(b). Return only the keywords that are not a prefix of any other keyword, preserving their original relative order.
Function: pruneKeywords(keywords: list<string>) -> list<string>
...
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.