Page 1006 - AP Computer Science A, 7th edition
P. 1006

17. (A) Notice that either vIndex or wIndex is incremented at the end of the loop. This means that, when the loop is exited, the current values of v[vIndex] and w[wIndex] have not been compared. Therefore, you can only make an assertion for v alues v[0]..v[vIndex–1] and w[0]..w[wIndex–1]. Als o, notice that if there is no common value in the arrays, the exiting condition for the while loop will be that the end of one of the arrays has been reached, namely vIndex equals N or wIndex equals M.


































































































   1004   1005   1006   1007   1008