Vote count:
0
I studied the union find algo and found it is very useful in following ways.
to find out if 2 node are connected or not
to compress the path. (save space)
if the problem is to find if 2 node connected or not , then we can use union
find.But if we have to find out the path between these 2 node,
then how can we use the data structure which is use to find
union find ( data structure use is - it store root element in
arrays of node. form kind of tree)?
I tried a lot and found that we have to use graph to find out the path\
between node and can not use union find data structure .
any other views on it.
asked 57 secs ago
Can we find the path between 2 node if they are connected using union-find algo?
Aucun commentaire:
Enregistrer un commentaire