Given two sorted arrays each without duplicated elements, write a function to compute their intersection (common elements).
nums = [1, 2, 3, 5] and
nums2 = [3, 4, 5, 7], return
- Each common element should only appear once in the result.
- The result also needs to be sorted.