Satisfiability of Equality Equations
Example
Input:
["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:
["b==a","a==b"]
Output:
true
Explanation:
We could assign a = 1 and b = 1 to satisfy both equations.Note
Code
Last updated