Skip to content

Commit 7ddac07

Browse files
authored
Update README.md
1 parent c9e2187 commit 7ddac07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/autocomplete/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ This module is a generic component that I made whilist building my solution to t
33

44
It basically contains a ```Trie``` data structure (aka prefix tree, radix tree) that also implements word approximation by computing the Levenshtein distance between its nodes.
55
- This data structure can insert with O(log(n)) and search with O(log(n)) + the complexity of the levenshtein distance.
6-
- The current implementation of the levenshtein algorithm adds only a small overhead. It computes with a worst case scenario of O(maxWordLength * totalNumberOfNodes), average of O(totalNumberOfWords * maxWordLength^2). For the insight of this very reasonable time complexisty, I give the credits to [Steve Hanov's Blog](http://stevehanov.ca/blog/index.php?id=114).
6+
- The current implementation of the levenshtein algorithm adds only a small overhead. It computes with a worst case scenario of O(maxWordLength * totalNumberOfNodes), average of O(totalNumberOfWords * maxWordLength^2). For the insight of this very reasonable time complexity, I give the credits to [Steve Hanov's Blog](http://stevehanov.ca/blog/index.php?id=114).
77
- The result of the search (only the words that match the query) is sorted by score with O(n log(n)) at the very end of the search.
88

99
This module also contains an implementation for data normalization that scales/aggregates score results to the range of 0-1.

0 commit comments

Comments
 (0)