Sobes.tech
Intern — Senior

Function to determine if a string is a palindrome

livecode

Task condition

Create a function that checks whether a given string is a palindrome—that is, it reads the same forwards and backwards, ignoring case, spaces, and punctuation.

Examples of palindrome strings:

  • Kazak
  • A man, a plan, a canal, Panama
  • Do geese see God?
  • Madam, I’m Adam

Additional requirement: use only a constant amount of extra memory—O(1).