Movatterモバイル変換


[0]ホーム

URL:


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

Commit51c4bac

Browse files
refactor 1268
1 parent29089bb commit51c4bac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/main/java/com/fishercoder/solutions/_1268.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ public List<List<String>> suggestedProducts(String[] products, String searchWord
99
TrieNoderoot =buildTrie(products);
1010
List<List<String>>result =newArrayList<>();
1111
for (inti =1;i <=searchWord.length();i++) {
12-
StringsearchTerm =searchWord.substring(0,i);
13-
result.add(findTopThreeMatches(root,searchTerm));
12+
result.add(findTopThreeMatches(root,searchWord.substring(0,i)));
1413
}
1514
returnresult;
1615
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp