MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / insert_many

Method insert_many

data_structures/trie/trie.py:15–22  ·  view source on GitHub ↗

Inserts a list of words into the Trie :param words: list of string words :return: None

(self, words: [str])

Source from the content-addressed store, hash-verified

13 self.is_leaf = False
14
15 def insert_many(self, words: [str]): # noqa: E999 This syntax is Python 3 only
16 """
17 Inserts a list of words into the Trie
18 :param words: list of string words
19 :return: None
20 """
21 for word in words:
22 self.insert(word)
23
24 def insert(self, word: str): # noqa: E999 This syntax is Python 3 only
25 """

Callers 1

testFunction · 0.95

Calls 1

insertMethod · 0.95

Tested by

no test coverage detected