PhonePe Interview Question

1st round: 1nd coding question: Palindrome of a string