4 ms·
If you're like me, and have forgotten union vs intersection, I'll restate the question: Sets A and B are each sorted, and they have no elements in common. If y
by pronoiac 9y ago
If you're like me, and have forgotten union vs intersection, I'll restate the question:
Sets A and B are each sorted, and they have no elements in common. If you combine A and B, what would be the kth smallest element?
- OJFord 9y agoThe sets do not necessarily have no elements in common - their union is the set of all the elements in either of them. (Being a set, it does not have 'duplicates' even if an element appears in both of your A and B.)
- pronoiac 9y agoThe lack of overlap is mentioned in the body, but not in the title. The title is so close to presenting the problem on a way that people could fully consider how they'd handle the problem before following the link. Just add "disjoint" to the title.