← 返回 roblox 的题目列表Remove Prefix Strings
类型:online_judge
roblox
Given a string array arr, implement an algorithm to find all strings that are not prefixes of any other strings in the array. Keep the order of the remaining strings as the same. For instance, with input arr = ['a', 'abc', 'abc hello', 'bc'], the output should be ['abc hello', 'bc'].
Example
Input
a
abc
abc hello
bc