t-complexity: $O(n)$
s-complexity: $O(n)$
用hash存放出现的字符串。最后扫描一遍hash表
Last updated 3 years ago
Was this helpful?