摘要:
从下面往上 可以建立一个cache 这个点往下search过已经知道最小值了 下一次访问的时候就可以直接取值, 因为一般一个点都会被上面访问两次,如果不这样就会time limit错误 阅读全文
摘要:
1 class Solution { 2 List res = new ArrayList(); 3 public List getRow(int rowIndex) { 4 helper(1, rowIndex + 1, new ArrayList(), null); 5 return res; 6 7 }... 阅读全文
摘要:
1 class Solution { 2 List> res = new ArrayList(); 3 public List> generate(int numRows) { 4 helper(1, numRows, new ArrayList(), null); 5 return res; 6 7 }... 阅读全文