Finding intersection of two sorted arrays