Yandex interview question

leetcode task Valid Palindrome II