Fix bug in disjoint set that didn't update ranks and didn't create a circular linked list
Fix bug in disjoint set that didn't update ranks and didn't create a circular linked list

miguelfrde/image-segmentation,miguelfrde/image-segmentation