diff --git a/content/posts/2024-06-30-trie/index.md b/content/posts/2024-06-30-trie/index.md index bf79613..e6de1a9 100644 --- a/content/posts/2024-06-30-trie/index.md +++ b/content/posts/2024-06-30-trie/index.md @@ -164,8 +164,8 @@ def get_fuzzy(self, key: str, max_distance: int = 0) -> Iterator[FuzzyResult[T]] row = list(range(len(key) + 1)) # Base case for the empty string - if (distance := row[-1]) <= max_distance and node._value != None: - yield FuzzyResult(distance, "", node._value) + if (distance := row[-1]) <= max_distance and self._value != None: + yield FuzzyResult(distance, "", self._value) for c, child in self._children.items(): yield from helper(c, child, row) ```