Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?



The 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.)


The 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.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: