Map creation

Report a typo

You are given three Strings as input. Create a Map using these strings. Use the String as the key, and its length as the value. Return the resulting Map.

Sample Input 1:

I love Kotlin

Sample Output 1:

{I to 1}, {love to 4}, {Kotlin to 6}

Sample Input 2:

Strings Ints Objects

Sample Output 2:

{Strings to 7}, {Ints to 4}, {Objects to 7}
Write a program in Kotlin
fun stringToMap(first: String, second: String, third: String): Map<String, Int> {
// put your code here
}
___

Create a free account to access the full topic