Aug 3, 2024
I
and J
to zero.I
in array 1 and J
in array 2:
I
is smaller, add it to the union and increment I
.J
is smaller, add it to the union and increment J
.I
and J
.I
.J
.I
and J
.I
.I
and J
.J
.I
and J
to zero.I
in array 1 and J
in array 2:
I
and J
.I
is smaller, increment I
.J
is smaller, increment J
.I
.J
.I
.