Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 848 Bytes

File metadata and controls

33 lines (20 loc) · 848 Bytes

Check Palindrome

Given the string, check if it is a palindrome.


Example:

  • For inputString = "aabaa", the output should be checkPalindrome(inputString) = true.
  • For inputString = "abac", the output should be checkPalindrome(inputString) = false.
  • For inputString = "a", the output should be checkPalindrome(inputString) = true.

Input/Output:

  • [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 if inputString is a palindrome
    • false otherwise

Solution: