Union of two sorted arrays

Medium

Given two sorted arrays a and b, each with lengths m and n respectively, write a function to return the union of the two arrays while preserving duplicate values. You may assume that the first array, a, has size equal to m + n, meaning it has enough space to hold additional elements from array b....

Sign in to InterviewQs to view this question

Or

New to InterviewQs? Sign up now.

By proceeding, you agree to our Terms and Conditions and Privacy Policy.

Loading editor...