Skip to content

Commit d3db213

Browse files
refactor 1258
1 parent b25b34a commit d3db213

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

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

-24
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,6 @@
99
import java.util.Map;
1010
import java.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
public class _1258 {
3713
public static class Solution1 {
3814
public List<String> generateSentences(List<List<String>> synonyms, String text) {

0 commit comments

Comments
 (0)