Given a string s, write a function that returns true if s is a palindrome and false otherwise. A palindrome reads the same forward and backward. Compare characters exactly as given, including case and spaces.
Constraints
0 <= len(s) <= 10^5
s contains ASCII characters
Compare characters exactly as given, including case and spaces
Function Signature
defis_palindrome(s):
Interviewer
Your question is Check String Palindrome. Start with the requirements in the Question tab.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.