can u tell me what is the mistake in my code
Disjointset union
check now ->
this issue was with the size.
ur code is accessing V th index , but the parent array size is V…
make it V+1 and it will work fine
can u tell me what is the mistake in my code
check now ->
this issue was with the size.
ur code is accessing V th index , but the parent array size is V…
make it V+1 and it will work fine