Tokopedia interview question

Code palindrome string and optimize it with memoization