I didn’t understand how the code is working
Path compression example dry run
hello @Senjuti256
use this tool for visualization .
this will give better clarity about dsu .disjoint set
tool is not working how to use it?
give two number inside input box before union button and click union to perform union
for find operation give one number in input box before find button and click find.
select other params (path compression,union by rank ) if u want
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.