734. Sentence Similarity

Given two sentences sentence1 and sentence2, determine if they are similar. A list of similar word pairs is provided where similarPairs[i] = [word1, word2] means word1 is similar to word2. A word is always similar to itself, and similarity is symmetric but not transitive.

Examples
Input: [["w0_0"],["w0_0"],[["w0_0","x0_0"]]]
Output: true
Hints
Related Problems

734. Sentence Similarity

Given two sentences `sentence1` and `sentence2`, determine if they are similar. A list of similar word pairs is provided where `similarPairs[i] = [word1, word2]` means word1 is similar to word2. A word is always similar to itself, and similarity is symmetric but not transitive.