such as
arrA = [1, 2, 3, 4, 5];
arrB = [1, 1, 2, 3, 3];
want arrB to become [1, 1, 2, 3, 3, 4, 5]
the first idea is to first use a temporary array to save the non-repeating elements in the array AB, and then push them into arrB one by one.
is more troublesome to operate, and intuitively there will be a faster way