Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf855c81

Browse files
committed
dp
1 parent2aba62d commitf855c81

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎dp/WordBreak2.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public static void dfs3(String s, Set<String> dict,
287287
}
288288

289289
/*
290-
// 解法4:先用DP来求解,然后再做
290+
// 解法4:先用DP来求解某些字段是否能word break,然后再做
291291
*/
292292
// 我们用DFS来解决这个问题吧
293293
publicstaticList<String>wordBreak4(Strings,Set<String>dict) {
@@ -320,7 +320,6 @@ public static List<String> wordBreak4(String s, Set<String> dict) {
320320
returnret;
321321
}
322322

323-
// 我们用DFS模板来解决这个问题吧
324323
publicstaticvoiddfs4(Strings,Set<String>dict,
325324
List<String>path,List<String>ret,intindex,
326325
booleancanBreak[]) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp