set_union
and find
defined explicitly.
set_union
.
set_union
considers the size of the two sets, and changes the ID of the smaller set.
find
flattens the tree that it goes through.
binary_search
, you can run the program as follows:
binary_search input2.txt 321492
selection_sort
, you can run the program as follows:
selection_sort input3.txt output.txt