0
MAMansimar Anand
Count the frequency of character in the string
0 Comments
int count(string s, char c) { int freq = 0; for (char curr : s) freq += (curr == c); return freq; }