Approach hintTry it first, then revealHide
Compare from both ends until the first mismatch; the value to delete must be one of those two elements. Try each choice and recheck the palindrome with two pointers, skipping elements equal to it.
Compare from both ends until the first mismatch; the value to delete must be one of those two elements. Try each choice and recheck the palindrome with two pointers, skipping elements equal to it.