Given the string, check if it is a palindrome.
- For
inputString = "aabaa"
, the output should becheckPalindrome(inputString) = true
. - For
inputString = "abac"
, the output should becheckPalindrome(inputString) = false
. - For
inputString = "a"
, the output should becheckPalindrome(inputString) = true
.
-
[execution time limit] 5 seconds (ts)
-
[input] string
inputString
- A non-empty string consisting of lowercase characters.
- Guaranteed constraints:
$1 \le inputString.length \le 10^{5}$
-
[output] boolean
-
true
ifinputString
is a palindrome -
false
otherwise
-