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

Commitd3db213

Browse files
refactor 1258
1 parentb25b34a commitd3db213

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

‎src/main/java/com/fishercoder/solutions/_1258.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,6 @@
99
importjava.util.Map;
1010
importjava.util.Set;
1111

12-
/**
13-
* 1258. Synonymous Sentences
14-
*
15-
* Given a list of pairs of equivalent words synonyms and a sentence text, Return all possible synonymous sentences sorted lexicographically.
16-
*
17-
* Example 1:
18-
* Input:
19-
* synonyms = [["happy","joy"],["sad","sorrow"],["joy","cheerful"]],
20-
* text = "I am happy today but was sad yesterday"
21-
* Output:
22-
* ["I am cheerful today but was sad yesterday",
23-
* ​​​​​​​"I am cheerful today but was sorrow yesterday",
24-
* "I am happy today but was sad yesterday",
25-
* "I am happy today but was sorrow yesterday",
26-
* "I am joy today but was sad yesterday",
27-
* "I am joy today but was sorrow yesterday"]
28-
*
29-
* Constraints:
30-
* 0 <= synonyms.length <= 10
31-
* synonyms[i].length == 2
32-
* synonyms[0] != synonyms[1]
33-
* All words consist of at most 10 English letters only.
34-
* text is a single space separated sentence of at most 10 words.
35-
* */
3612
publicclass_1258 {
3713
publicstaticclassSolution1 {
3814
publicList<String>generateSentences(List<List<String>>synonyms,Stringtext) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp