Can u pls explain me clearly why 0-based indexing in been used here???
Zero based indexing
hello @soumakpoddar55
In the video the implementation of dsu is for 0 based indexing. but the edges we are given is 1 based indexing. so to use dsu implementation he has converted edges to 0 based indexing by subtrating 1 from x and y.
if u have implemented dsu for 1 based indexing then no need to subtract 1 from x and y.