赞
踩
题目:
题解:
- class Solution {
- public List<Integer> getRow(int rowIndex) {
- List<Integer> row = new ArrayList<Integer>();
- row.add(1);
- for (int i = 1; i <= rowIndex; ++i) {
- row.add((int) ((long) row.get(i - 1) * (rowIndex - i + 1) / i));
- }
- return row;
- }
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。