At Grammarly, you need a utility function that checks whether a given string reads the same forward and backward. Write a function that returns True if the input string is a palindrome and False otherwise.
sTrue if s is identical when reversedFalse otherwiseA palindrome comparison in this problem is case-sensitive and includes all characters exactly as they appear.
Example 1
Input: s = "racecar"
Output: True
Explanation: The string is the same from left to right and right to left.
Example 2
Input: s = "hello"
Output: False
Explanation: Reversing the string gives "olleh", which is different from "hello".
Example 3
Input: s = "abba"
Output: True
Explanation: Matching characters appear symmetrically from both ends.
0 <= len(s) <= 10^5s may contain letters, digits, spaces, or symbols