Agoda interview question

Easy-Medium Leetcode questions, detect palindrome