8000 update 139 · githubniraj/Leetcode@bfc9050 · GitHub
[go: up one dir, main page]

Skip to content

Commit bfc9050

Browse files
update 139
1 parent 56252d5 commit bfc9050

File tree

1 file changed

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

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ public boolean wordBreak(String s, List<String> wordDict) {
1717
dp[0] = true;
1818
for (int i = 1; i <= n; i++) {
1919
for (int j = 0; j < i; j++) {
20-
if (dp[j]
21-
&&
22-
wordDict.contains(s.substring(j, i))) {
20+
if (dp[j] && wordDict.contains(s.substring(j, i))) {
2321
dp[i] = true;
2422
break;
2523
}

0 commit comments

Comments
 (0)
0