Leetcode Union Of Two Arrays Using Functions