Solution 1 Trie

  • t-complexity: $O(n)$

  • s-complexity: $O(C * n)$ C is size of charset, there is 26

该题与208. 实现 Trie (前缀树)大同小异,只需要对.单独处理就可以了。

Last updated