i
and j
to 0
.i
is less than the length of nums1
and j
is less than the length of nums2
:
a. If nums1[i]
is equal to nums2[j]
, return nums1[i]
as the minimum common integer.
b. If nums1[i]
is less than nums2[j]
, increment i
.
c. Otherwise, increment j
.-1
.