#coding:utf-8 import collections class TrieNode(object): def __init__(self): self.children = collections.defaultdict(TrieNode) self.is_word = False # 字典树的数据结构 class WordDictionary(object): def __init__(self): ...