In the input, you are given a List of products that you put on the shelf and a String that represents a specific product. Print out this product's position on the shelf. Note that products may repeat.
List
Indexes
Report a typo
Sample Input 1:
Mustard Cheese Eggs Cola Eggs
EggsSample Output 1:
2 4Write a program in Kotlin
fun solution(products: List<String>, product: 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.