You are given a string S containing lowercase English alphabets and a character k.
Task
Count the number of occurrences of k in S.
Example
Assumptions
Approach
Function description
Complete the solve function which takes a string S and a character k as the argument and returns the number of occurrences of k in S:
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).
Output format
For each test case, print a single line representing the number of occurrences of k in S.
Constraints
1≤T≤101≤|S|≤105
Given
The first line represents the number of test cases, T=1.
Approach
Since the number of occurrences of "d" in S is 3, the answer is 3.