## Description

*Question SOLVED*: Give an efficient algorithm to compute the union of sets A and B, where n = max(|A|, |B|).

Give an efficient algorithm to compute the union of sets *A* and *B*, where *n* = max(*|A|, |B|*). The

output should be an array of distinct elements that form the union of the sets, such that they

appear exactly once in the union. Assume that *A* and *B* are unsorted. Give an *O*(*n* log *n*) time

algorithm for the problem.