Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f58e490

Browse files
Merge pull request #4 from cmd-opt-i/master
Fixes typo error in trie data structure
2 parents aab699f + 999b45e commit f58e490

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎data-structures-in-javascript/trie.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Trie {
118118
getWords() {
119119
const words = [];
120120
const word = '';
121-
this._getWords(this.root, words, words,word);
121+
this._getWords(this.root, words, word);
122122
return words;
123123
}
124124

‎data-structures-in-javascript/trie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Trie.prototype.countWords = function() {
110110
Trie.prototype.getWords = function() {
111111
var words = [];
112112
var word = '';
113-
this._getWords(this.root, words, words,word);
113+
this._getWords(this.root, words, word);
114114
return words;
115115
};
116116
Trie.prototype._getWords = function(node, words, word) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /