Given two sorted arrays: A and B. The size of array A is La and the size of array B is Lb. How
A
B
La
Lb
Use set_intersection as here. The usual implementation would work similar to the merge part of merge-sort algorithm.
set_intersection