comefrom: <awangdev>516. Longest Palindromic Subsequence_2.java
code: public int longestPalindromeSubseq(String s) {
          char[] ss = s.toCharArray();
          int n = s.length();
          int[][] dp = new int[n][n];
          
          for (int i = 0; i < n; i++) dp[i][i] = 1;
          
          for (int i = 0; i < n - 1; i++) dp[i][i + 1] = ss[i] == ss[i + 1] ? 2 : 1;
          
          for (int len = 3; len <= n; len++) {
              for (int i = 0; i <= n - len; i++) { 
                  int j = len + i - 1;
  
                  dp[i][j] = Math.max(dp[i + 1][j], dp[i][j - 1]); 
                  
                  if (ss[i] == ss[j]) dp[i][j] = Math.max(dp[i][j], dp[i + 1][j - 1] + 2);
              }
          }
          return dp[0][n - 1];
      }
masked: public int sample_funcname ( String var_1 ) {
    char [ ] var_3 = var_1 . toCharArray ( ) ;
    int var_5 = var_1 . length ( ) ;
    int [ ] [ ] var_6 = new int [ var_5 ] [ var_5 ] ;
    for ( int var_8 = 0 ;
    var_8 < var_5 ;
    var_8 ++ ) var_6 [ var_8 ] [ var_8 ] = 1 ;
    for ( int var_8 = 0 ;
    var_8 < var_5 - 1 ;
    var_8 ++ ) var_6 [ var_8 ] [ var_8 + 1 ] = var_3 [ var_8 ] == var_3 [ var_8 + 1 ] ? 2 : 1 ;
    for ( int var_12 = 3 ;
    var_12 <= var_5 ;
    var_12 ++ ) {
      for ( int var_8 = 0 ;
      var_8 <= var_5 - var_12 ;
      var_8 ++ ) {
        int var_13 = var_12 + var_8 - 1 ;
        var_6 [ var_8 ] [ var_13 ] = Math . max ( var_6 [ var_8 + 1 ] [ var_13 ] , var_6 [ var_8 ] [ var_13 - 1 ] ) ;
        if ( var_3 [ var_8 ] == var_3 [ var_13 ] ) var_6 [ var_8 ] [ var_13 ] = Math . max ( var_6 [ var_8 ] [ var_13 ] , var_6 [ var_8 + 1 ] [ var_13 - 1 ] + 2 ) ;
      }
    }
    return var_6 [ 0 ] [ var_5 - 1 ] ;
  }
  