You are viewing a single comment's thread. Return to all comments →
Really bad problem description.
"the string being checked." means you maintain a set which is empty at first. Then you need to check (or process, or add) the word one by one".
And when you found 1. the current string is a prefix any string in the set, or 2. any string in the set is a preifx of current string
You print current string.
Seems like cookies are disabled on this browser, please enable them to open this website
No Prefix Set
You are viewing a single comment's thread. Return to all comments →
Really bad problem description.
"the string being checked." means you maintain a set which is empty at first. Then you need to check (or process, or add) the word one by one".
And when you found 1. the current string is a prefix any string in the set, or 2. any string in the set is a preifx of current string
You print current string.