Skip to content

Commit c6bbb4d

Browse files
refactor 734
1 parent 1d1f64e commit c6bbb4d

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

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

-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 734. Sentence Similarity
5-
*
6-
* Given two sentences words1, words2 (each represented as an array of strings), and a list of similar word pairs pairs, determine if two sentences are similar.
7-
* For example, "great acting skills" and "fine drama talent" are similar, if the similar word pairs are pairs = [["great", "fine"], ["acting","drama"], ["skills","talent"]].
8-
* Note that the similarity relation is not transitive. For example, if "great" and "fine" are similar, and "fine" and "good" are similar, "great" and "good" are not necessarily similar.
9-
* Also, a word is always similar with itself. For example, the sentences words1 = ["great"], words2 = ["great"], pairs = [] are similar, even though there are no specified similar word pairs.
10-
11-
Note:
12-
13-
The length of words1 and words2 will not exceed 1000.
14-
The length of pairs will not exceed 2000.
15-
The length of each pairs[i] will be 2.
16-
The length of each words[i] and pairs[i][j] will be in the range [1, 20].
17-
*/
183
public class _734 {
194
public static class Solution1 {
205
public boolean areSentencesSimilar(String[] words1, String[] words2, String[][] pairs) {

0 commit comments

Comments
 (0)