1
class Solution {
2
public:
3
int percentageLetter(string s, char letter) {
4
int count = 0;
5
for (int i = 0; i < s.length(); i++) {
6
if (s[i] == letter) {
7
count++;
8
}
9
}
10
return (count * 100) / s.length();
11
}
12
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0