How to Reverse Letters in Kotlin
The challenge Given a string str, reverse it omitting all non-alphabetic characters. Examples: For str = "krishan", the output should be "nahsirk". For str = "ultr53o?n", the output should be "nortlu". Input/Output: [input] string str A string consists of lowercase Latin letters, digits, and symbols. [output] a string The solution in Kotlin Option 1: fun reverseLetter(str: String): String { return str.filter(Char::isLetter).reversed() } Option 2: fun reverseLetter(str: String) = str.reversed().filter{ it.isLetter() } Option 3:...