find common elements in 2 sorted array
shift number according to window size