Microsoft interview question

Implement palindrome function. Make it work with non-clean inputs. Make it as performant as possible