Number of occurrences

Report a typo

You are given a List of strings and a String in the input.

Calculate the number of occurrences of the String in the List.

Sample Input 1:

Fred Pola Mike Fred
Fred

Sample Output 1:

2
Write a program in Kotlin
fun solution(strings: List<String>, str: String): Int {
// put your code here
}
___

Create a free account to access the full topic