public class Solution { public List getRow(int rowIndex) { List res = new ArrayList(); for(int i = 0;i0;j--) { res.set(j, res.get(j-1)+res.get(j)); } } return res; } }