Consider the following code, in which $\text{A}$ and $\text{B}$ are arrays indexed from $0$ and $\textsf{lenA}$ and $\textsf{lenB}$ are the numbers of elements in $\text{A}$ and $\text{B}$, respectively.
function foo (A, B, lenA, lenB) {
sum = lenA + lenB;
i = 0 ;
j = 0 ;
for t = 0 to (sum – 1) {
if (A[i] < B[j] ) {
i = i + 1;
} else {
if (A[i] > B[j] ) {
j = j + 1 ;
} else {
return A[i];
}
}
}
return ( – 1) ;
}
Let $\text{A} = [2, 4, 6, 7, 8, 9, 10]$ and $\text{B} = [1, 3, 5, 7, 9, 11, 13]$. What does $\textsf{foo(A, B, 7, 7)}$ return?