摘要:
1 class TrieNode: 2 def __init__(self): 3 self.children = dict() 4 self.words = [] 5 6 class Trie: 7 def __init__(self): 8 self.root = TrieNode() 9 10 阅读全文
摘要:
1 class Solution: 2 def getLevelFriends(self,friends,visited,id,level,l): 3 while len(l) > 0 and level > 0: 4 temp = [] 5 while len(l) > 0: 6 cur = l. 阅读全文