大佬们的思路:利用dfs,对于i位置的的字符,两个子序列可以选择用或者不用;class Solution { int res=0; public int maxProduct(String s) { dfs(s,"","",0); return res; } public void dfs(String s,String s1,String s2,int index){ if(check(s1)&&check(s2)){ res=Math.max(res,s1.length()*s2.length());//比较大小 } if(index...