IBM Interview Question

They asked easy leetcode questions. Palindrome.