Fast Enterprises Interview Question

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