time complexity of comparing two sets