IBM interview question

LeetCode problem - valid palindrom