Skip to content

Instantly share code, notes, and snippets.

@UNISERVO1
Last active August 4, 2020 02:14
Show Gist options
  • Save UNISERVO1/2342925e94df038f3dd6e1557f8e51aa to your computer and use it in GitHub Desktop.
Save UNISERVO1/2342925e94df038f3dd6e1557f8e51aa to your computer and use it in GitHub Desktop.
August LeetCoding Challenge Week 1: Day 3
class Solution {
fun isPalindrome(s: String): Boolean {
val targetString: String = s.filter{ it.isLetterOrDigit() }.toLowerCase()
return targetString == targetString.reversed()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment