We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e459d5 commit fa05386Copy full SHA for fa05386
src/class044/Code02_TrieTree.java
@@ -71,6 +71,10 @@ public static int prefixNumber(String pre) {
71
public static void delete(String word) {
72
if (search(word) > 0) {
73
int cur = 1;
74
+ // 如下这行代码,讲课的时候没加
75
+ // 本题不会用到pass[1]的信息,所以加不加都可以
76
+ // 不过正确的写法是加上
77
+ pass[cur]--;
78
for (int i = 0, path; i < word.length(); i++) {
79
path = word.charAt(i) - 'a';
80
if (--pass[tree[cur][path]] == 0) {
0 commit comments