大佬能解释一下,代码1和2的区别吗
代码1
while (p < a.length && q < c.length) {
if (a[p] < b[i]) {p++;
}
if (c[q] <= b[i]) {
q++;
}
}
代码2
while (p < a.length && a[p] < b[i])
p++;
p++;
while (q < c.length && c[q] <= b[i])
q++;
q++;