码迷,mamicode.com
首页 > 其他好文 > 详细

118 Pascal's Triangle

时间:2015-05-18 07:49:12      阅读:132      评论:0      收藏:0      [点我收藏+]

标签:

public class Solution {
    public ArrayList<ArrayList<Integer>> generate(int numRows) {
        ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();
        if (numRows == 0) {
            return res;
        }
        
        
        ArrayList<Integer> first = new ArrayList<Integer>();
        first.set(0, 1);
        res.add(first);
        
        for (int i = 1; i < numRows; i++) {
            ArrayList,
        }
    }
}

 

118 Pascal's Triangle

标签:

原文地址:http://www.cnblogs.com/77rousongpai/p/4511017.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!