Treats each cell as a separate set. Randomly picks walls and removes them if the cells on either side belong to different sets (union-find). Colors show distinct sets merging.