I have to find an algorithm that can find the total amount of intersections between two sets of arrays, whereas one of the array is sorted.
An example, we have these two arrays and we draw straight lines towards corresponding number.
These two arrays gives us a total of 7 intersections.
What kind of algorithms does it exist to help me with this problem?
I have used the search button but did not find anything that would solve this problem for me.
Thanks