Is a reversed word

Report a typo

Write a function named isReversed with a Pair parameter with two words, which returns a Triple with the two given words and the word "true" if second word is reversed first or "false" if it is not. The function should be case-insensitive

Sample Input 1:

cat dog

Sample Output 1:

(cat, dog, false)

Sample Input 2:

Otto otto

Sample Output 2:

(Otto, otto, true)
Write a program in Kotlin
fun isReversed(pair: Pair<String, String>): Triple<String, String, Boolean> {
// write your code here
}
___

Create a free account to access the full topic