0990. Satisfiability of Equality Equations
Description
**Input:** equations = ["a==b","b!=a"]
**Output:** false
**Explanation:** If we assign say, a = 1 and b = 1, then the first equation is satisfied, but not the second.
There is no way to assign the variables to satisfy both equations.**Input:** equations = ["b==a","a==b"]
**Output:** true
**Explanation:** We could assign a = 1 and b = 1 to satisfy both equations.**Input:** equations = ["a==b","b==c","a==c"]
**Output:** true**Input:** equations = ["a==b","b!=c","c==a"]
**Output:** falseac
Last updated