Skip to content

Commit c612b38

Browse files
refactor 119
1 parent a583038 commit c612b38

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+1
-1
lines changed

src/main/java/com/fishercoder/solutions/_119.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static class Solution2 {
4343
/** O(k) space */
4444
public List<Integer> getRow(int rowIndex) {
4545
List<Integer> row = new ArrayList<>();
46-
for (int i = 0; i < rowIndex + 1; i++) {
46+
for (int i = 0; i <= rowIndex; i++) {
4747
row.add(0, 1);
4848
for (int j = 1; j < row.size() - 1; j++) {
4949
row.set(j, row.get(j) + row.get(j + 1));

0 commit comments

Comments
 (0)