<awangdev>140. Word Break II_4.java
public boolean[] validatePossibility(List<String> wordDict, boolean[][] isWord, String s) {
        int maxLen = 0;
        for (String word : wordDict) {
            maxLen = Math.max(maxLen, word.length());
        }

        int n = s.length();
        boolean[] isValid = new boolean[n + 1];
        isValid[n] = true;
        for (int i = n - 1; i >= 0; i--) {
            for (int j = i; j < n; j++) {
                if (isWord[i][j] && isValid[j + 1]) {
                    isValid[i] = true;
                    break;
                }
            }
        }
        return isValid;
    }
public boolean [ ] var_0 ( List < String > var_3 , boolean [ ] [ ] var_5 , String var_6 ) {
  int var_8 = 0 ;
  for ( String var_9 : var_3 ) {
    var_8 = Math . max ( var_8 , var_9 . length ( ) ) ;
  }
  int var_13 = var_6 . length ( ) ;
  boolean [ ] var_15 = new boolean [ var_13 + 1 ] ;
  var_15 [ var_13 ] = true ;
  for ( int var_16 = var_13 - 1 ;
  var_16 >= 0 ;
  var_16 -- ) {
    for ( int var_17 = var_16 ;
    var_17 < var_13 ;
    var_17 ++ ) {
      if ( var_5 [ var_16 ] [ var_17 ] && var_15 [ var_17 + 1 ] ) {
        var_15 [ var_16 ] = true ;
        break ;
      }
    }
  }
  return var_15 ;
}
