How to find intersection of two sorted array

[Question] In given two sorted arrays find intersection.// Ex–>    A: [1 2 3 3 4 5 6] , B: [3 3 5] Output: 3,3,5#Approach: // TC O(n) // SC O(1)