Let 'N' = 5, 'S' = "bbacb", 'C' = 'b'.
The character 'b' appears 3 times in the string "bbacb".
Therefore, the answer is 3.
The first line contains the integer 'N', the length of the string 'S'.
The second line contains the string 'S' of length 'N'.
The third line contains the character 'C' to be counted.
Return the total count of the character 'C' in the string 'S'.
You don’t need to print anything. Just implement the given function.
1 <= 'N' <= 10^5
'a' <= characters in 'S' <= 'z'
'a' <= 'C' <= 'z'
Time Limit: 1 sec
Approach:
Algorithm: