题源:leetcode
链接:https://leetcode-cn.com/problems/pascals-triangle/
数学方法这里不赘述,这里写一下动态规划的转移方程
dp[i][j] = dp[i-1][j-1] + dp[i-1][j]