Palindrome test

Report a typo

A palindrome is a word or group of words that remains the same whether you read it forwards from the beginning or backwards from the end: "refer" and "level" are palindromes. Please complete the function definition to return true if a text is a palindrome.

Sample Input 1:

xanax

Sample Output 1:

true
Write a program in Kotlin
// complete the function
fun isPalindrome(text: String): Boolean {

}

Create a free account to access the full topic