Umm, no. OP wrote "... and replace it with a number from the second array with out duplicating numbers in the first array".
It's not clear if OP intended to add a new element to the first array or replace the deleted element's value. That is, it's not clear if the ordering of the array is important of not, but it is clear that the first array should get a new element from the second array that doesn't already exist in the first array.
In reply to Re^2: Array searching
by GrandFather
in thread Array searching
by scoobyrico
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |