How to merge an array by replacing the equal numbers?
Example:
Home
array1 = [1, 2, 3];
array2 = [2, 4, 5];
array3 would be [1, 2, 3, 4, 5];
instead of% with%
How to merge an array by replacing the equal numbers only in odd-numbered arrays? (same thing from the question from above but only in odd houses)
Home
Example 1:
array1 = [1, 2, 2, 3, 4, 5];
array2 = [1, 1, 2];
array3 would be [3, 4, 6];
Example 2:
array1 = [1, 2, 3, 6];
array2 = [4, 1, 5];
array3 would be [4, 4, 3];