Modified Union Find Data Structure

51 Views Asked by At

connected: takes two arguments s and t and returns true if they are in the same set and false otherwise.

combine: takes two arguments s and t and creates a union of the two sets that contain s and t such that if s is in S and t is in T it removes S and T and replaces it with the union of S and T.

0

There are 0 best solutions below