You are given a MutableList of strings and a String in the input. Replace all occurrences of the given String in the MutableList with Banana.
Mutable List
Banana!
Report a typo
Sample Input 1:
Sometimes you have to shake up your life
shakeSample Output 1:
Sometimes you have to Banana up your lifeWrite a program in Kotlin
fun solution(strings: MutableList<String>, str: String): MutableList<String> {
// put your code here
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.