[LeetCode/릿코드] 119. Pascal's Triangle II
문제 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 import java.util.ArrayList; import java.util.List; class Solution { public List getRow(int rowIndex) { List first = new ArrayList(); first.add(1); List second = new ArrayList(); second.add(1); second.add(1); if(rowIndex == 0) return first; if(rowIndex == 1) return second; List previous = new ArrayList();..