Amazon Interview Question

Coding Test: check palindrome string