Chetu Interview Question

They asked me solve a palimdrome problem