<awangdev>118. Pascal's Triangle_1.java
public List<List<Integer>> generate(int numRows) {
        List<List<Integer>> result = new ArrayList<>();
        if (numRows == 0) return result;
        if (numRows >= 1) result.add(Arrays.asList(1));
        if (numRows >= 2) result.add(Arrays.asList(1, 1));

        for (int row = 2; row < numRows; row++) {
            List<Integer> list = new ArrayList<>(Arrays.asList(1, 1));
            List<Integer> lastRow = result.get(row - 1);
            int end = row - 1;
            for (int i = 1; i <= end; i++) {
                list.add(i, lastRow.get(i) + lastRow.get(i - 1));
            }
            result.add(list);
        }
        return result;
    }
public List < List < Integer >> var_2 ( int var_3 ) {
  List < List < Integer >> var_5 = new ArrayList < > ( ) ;
  if ( var_3 == 0 ) return var_5 ;
  if ( var_3 >= 1 ) var_5 . add ( Arrays . asList ( 1 ) ) ;
  if ( var_3 >= 2 ) var_5 . add ( Arrays . asList ( 1 , 1 ) ) ;
  for ( int var_12 = 2 ;
  var_12 < var_3 ;
  var_12 ++ ) {
    List < Integer > var_13 = new ArrayList < > ( Arrays . asList ( 1 , 1 ) ) ;
    List < Integer > var_15 = var_5 . get ( var_12 - 1 ) ;
    int var_16 = var_12 - 1 ;
    for ( int var_17 = 1 ;
    var_17 <= var_16 ;
    var_17 ++ ) {
      var_13 . add ( var_17 , var_15 . get ( var_17 ) + var_15 . get ( var_17 - 1 ) ) ;
    }
    var_5 . add ( var_13 ) ;
  }
  return var_5 ;
}
