# Easy-题目34：119. Pascal's Triangle II

Given an index k, return the kth row of the Pascal’s triangle.

Easy第31题上修改，求出前n行，但只返回最后一行。

public class Solution {
public List<Integer> getRow(int rowIndex) {
List<List<Integer>> triangle=new ArrayList();
for(int i=0;i<=rowIndex;i++)
{
List<Integer> line=new ArrayList<Integer>();
for(int j=0;j<=i;j++)
}
return triangle.get(rowIndex);
}
}

4ms,beats 3.88%,众数3ms,51.41%
cmershen的碎碎念：

#### LeetCode(119) Pascal's Triangle II (Java)

2015-04-20 10:01:28

#### 【leetcode】Pascal's Triangle II (python)

2014-07-28 20:27:22

#### Pascal's Triangle II -- LeetCode

2014-04-10 00:56:53

#### LeetCode 119 Pascal's Triangle II（帕斯卡三角形II）（vector、数学公式）（*）

2016-01-23 10:11:19

#### 【LeetCode-面试算法经典-Java实现】【119-Pascal's Triangle II（帕斯卡三角形（杨辉三角）II）】

2015-08-13 06:21:37

#### 119. Pascal's triangle II Leetcode Python

2015-01-19 00:42:07

#### LeetCode 119：Pascal's Triangle II

2015-06-06 01:38:13

#### 118. Pascal's Triangle (python)

2016-10-30 16:04:38

#### [119] Pascal's Triangle II

2016-07-19 20:38:41

#### leetcode:Pascal's Triangle II 学会从后往前遍历

2017-02-07 12:25:14