Fiserv Interview Question

question about palidrome from leetcode