https://leetcode.com/problems/minimum-common-value/description/

class Solution {
public int getCommon(int[] nums1, int[] nums2) {
int lt = 0;
int rt = 0;
while(lt < nums1.length && rt < nums2.length) {
if(nums1[lt] < nums2[rt]) {
lt++;
} else if(nums1[lt] > nums2[rt]) {
rt++;
} else {
return nums1[lt]; // 같으니까 아무거나 반환해도됨
}
}
return -1;
}
}
