In AirBrush, you need a utility function to check whether a caption reads the same forward and backward. Write a function that returns True if a given string is a palindrome and False otherwise.
A palindrome should be checked exactly as given, meaning character case, spaces, and punctuation are all treated as normal characters.
sTrue if s is identical to its reverseFalse otherwiseExample 1
s = "level"TrueExample 2
s = "Air Apps"False0 <= len(s) <= 10^5s may contain letters, digits, spaces, and punctuationTry to solve this in linear time. A two-pointer approach is preferred because it avoids building a full reversed copy of the string.