MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / insert_many

Method insert_many

data_structures/trie/trie.py:14–21  ·  view source on GitHub ↗

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

(self, words: list[str])

Source from the content-addressed store, hash-verified

12 self.is_leaf = False
13
14 def insert_many(self, words: list[str]) -> None:
15 """
16 Inserts a list of words into the Trie
17 :param words: list of string words
18 :return: None
19 """
20 for word in words:
21 self.insert(word)
22
23 def insert(self, word: str) -> None:
24 """

Callers 1

test_trieFunction · 0.95

Calls 1

insertMethod · 0.95

Tested by 1

test_trieFunction · 0.76