A new video about the recent developments in coding has been published on the HackerEarth social media handle. After some time, it is seen that there are N comments added. The admin wants to see if there are any derogatory comments. Hence, he searched the comment section with a keyword S.
Task
Give the count of the comments that will be returned as a result of the search.
Notes
- The count can be 0.
- The algorithm searches the keyword irrespective of the case of the word.
- The separator here is “_”.
Example 1
Assumptions
Input
- N = 3
- S = “hate”
- comments = [“The_video_is_good”, “I_hate_this”, “Informative”]
Output: 1
Approach
Only the second comment contains the word “hate”.
Function description
Complete the function solution() provided in the editor. The function takes the following 3 parameters and returns the solution:
- N: Represents the number of comments
- S: Represents the keyword
- comments: Represents the array of comments
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).
- The first line contains N denoting the number of comments.
- The second line contains S denoting the keyword.
- Each of the next N lines contains a string denoting a comment.
Output format
Print an integer representing the number of comments containing the keyword.
Constraints
\(1 \le N \le 10^5 \\ 1 \le |S| \le 10 \\ 1 \le Sum\: of\: length\: of\: all\: comments \le 10^5 \\ S\: and\: comments\: contain\: only\: lower\: and\: upper\: case\: latin\: characters\: and\: underscores\)