LeetCode – 990 等式方程的可满足性
class Solution {
public boolean equationsPossible(String[] equations) {
int n = equations.length;
//String[] noequal = new String[n];
UnionFind uf = new UnionFind(26);
for(int i = 0;i < n;i++){
char c1 = equations[i].charAt(0);
char c2 = equations[i].charAt(3);
int index1 = c1-'a';
int index2 = c2-'a';
if(equati
版权声明:
作者:zhangchen
链接:https://www.techfm.club/p/20342.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论