Fast Enterprises interview question

Implement an algorithm that checks if a string is a palindrome. What if it has spaces?