Problem

Return true if s reads same forwards/backwards.

Examples

  • isPalindrome("aba") -> true
  • isPalindrome("ab") -> false
Compile and test (Ctrl+Enter)