4
public int maxProduct(String s) {5
char[] strArr = s.toCharArray();6
dfs(strArr, 0, "", "");10
public void dfs(char[] strArr, int i, String s1, String s2) {11
if (i >= strArr.length) {12
if (isPalindromic(s1) && isPalindromic(s2)) res = Math.max(res, s1.length() * s2.length());15
dfs(strArr, i + 1, s1 + strArr[i], s2);16
dfs(strArr, i + 1, s1, s2 + strArr[i]);17
dfs(strArr, i + 1, s1, s2);20
public boolean isPalindromic(String str) {21
int j = str.length() - 1;22
char[] strArr = str.toCharArray();23
for (int i = 0; i < j; i++) {24
if (strArr[i] != strArr[j]) return false;