Intersection of two sorted arrays; Subset Sum