Skip to content

Commit 7f9596b

Browse files
authored
Update reconstruct-original-digits-from-english.cpp
1 parent b5697fb commit 7f9596b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

C++/reconstruct-original-digits-from-english.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Time: O(n)
32
// Space: O(1)
43

@@ -31,7 +30,7 @@ class Solution {
3130
for (int j = 0; j < cnt.size(); ++j) {
3231
cnt[j] -= cnts[i][j];
3332
}
34-
result += to_string(i);
33+
result.push_back(i + '0');
3534
}
3635
}
3736
sort(result.begin(), result.end());

0 commit comments

Comments
 (0)