Skip to content

Commit 5c4e557

Browse files
committed
Runtime: 308 ms (Top 95.07%) | Memory: 104.8 MB (Top 66.85%)
1 parent 91b4a5d commit 5c4e557

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/algorithms/C/Count Words Obtained After Adding a Letter/Count Words Obtained After Adding a Letter.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
// Runtime: 308 ms (Top 95.07%) | Memory: 104.8 MB (Top 66.85%)
12
class Solution {
23
public:
34
int wordCount(vector<string>& startWords, vector<string>& targetWords) {
4-
// generates hashes for startWords.
5+
// generates hashes for startWords.
56
unordered_set<int> vis;
67
for (string s : startWords) {
78
int hash = 0;
@@ -10,8 +11,8 @@ class Solution {
1011
}
1112
vis.insert(hash);
1213
}
13-
14-
// check each target Word
14+
15+
// check each target Word
1516
int res = 0;
1617
for (string s : targetWords) {
1718
int hash = 0;
@@ -28,7 +29,7 @@ class Solution {
2829
}
2930
}
3031
}
31-
32+
3233
return res;
3334
}
34-
};
35+
};

0 commit comments

Comments
 (0)