Quick in-interview TDD'ed implementation
More efficient isPalindrome() implementation