摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.(Medium) For example, give 阅读全文
posted @ 2016-11-22 21:10 wangxiaobao1114 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Given an index k, return the kth row of the Pascal's triangle. (Easy) For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorith 阅读全文
posted @ 2016-11-22 21:08 wangxiaobao1114 阅读(366) 评论(0) 推荐(0) 编辑
摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, (Easy)Return 分析: 求解杨辉三角形,按照其定义以此求解即可,注意优化写法使其能够更简洁(比如对 阅读全文
posted @ 2016-11-22 21:06 wangxiaobao1114 阅读(239) 评论(0) 推荐(0) 编辑