Compass interview question

palindromes with variations that increased complexity