Skip to content

Commit 853906b

Browse files
committed
Fix type annotations for trie.py
1 parent 224f854 commit 853906b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

data_structures/trie/trie.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
longest word)) lookup time making it an optimal approach when space is not an issue.
66
"""
77

8+
from typing import List
9+
810

911
class TrieNode:
1012
def __init__(self):
1113
self.nodes = dict() # Mapping from char to TrieNode
1214
self.is_leaf = False
1315

14-
def insert_many(self, words: [str]):
16+
def insert_many(self, words: List[str]):
1517
"""
1618
Inserts a list of words into the Trie
1719
:param words: list of string words

0 commit comments

Comments
 (0)