Skip to content

Commit 1469ab6

Browse files
refactor format
1 parent 2720b9e commit 1469ab6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
public class _96 {
1717

1818
public int numTrees(int n) {
19-
int [] G = new int[n+1];
19+
int[] G = new int[n + 1];
2020
G[0] = G[1] = 1;
2121

22-
for (int i=2; i<=n; ++i) {
23-
for (int j=1; j<=i; ++j) {
24-
int temp = G[j-1] * G[i-j];
22+
for (int i = 2; i <= n; ++i) {
23+
for (int j = 1; j <= i; ++j) {
24+
int temp = G[j - 1] * G[i - j];
2525
G[i] = G[i] + temp;
2626
}
2727
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public boolean isInterleave(String s1, String s2, String s3) {
2727
for (int i = 0; i < m; i++) {
2828
if (s1.charAt(i) == s3.charAt(i)) {
2929
dp[i + 1][0] = true;
30-
} else {//if one char fails, that means it breaks, the rest of the chars won't matter any more.
30+
} else {
31+
//if one char fails, that means it breaks, the rest of the chars won't matter any more.
3132
//Mian and I found one missing test case on Lintcode: ["b", "aabccc", "aabbbcb"]
3233
//if we don't break, here, Lintcode could still accept this code, but Leetcode fails it.
33-
3434
break;
3535
}
3636
}

0 commit comments

Comments
 (0)