I have been looking over ways to find the intersection of two sorted sets that are more efficient than doing so iteratively. Eventually my searching brought me to this question: intersection and union of n-arrays in C . However, I do not understand how the intersection of two sets is equal to the intersection of the intersection of two subsets. I want to try to figure out how to do the divide and conquer algorithm with recursion, but I can't understand how the example given would work.
More specifically, how would a divide and conquer algorithm ever work for two sets such as:
A = 1, 2, 3, 4
B = 3, 5, 6, 7
It doesn't seem like a divide and conquer algorithm would exist that would actually consistently find the intersection at 3.