NeetCode #626LC-737MediumGraphs
← Back to All Problems#626 · #737 · Sentence Similarity II(句子相似性 II)
📌 Problem Statement & Constraints
You are given two sentences as arrays of words and a list of
similarPairs. Determine whether the sentences are similar, where similarity is now transitive (if a~b and b~c then a~c). Constraints: 1 <= length <= 1000, 0 <= similarPairs.length <= 2000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!