Challenge: Merge Two Sorted Arrays

Try to solve the Merge Two Sorted Arrays problem.

We'll cover the following

Statement

Given two integer arrays, nums1 and nums2, of size mm and nn, respectively, sorted in nondecreasing order. Merge nums1 and nums2 into a single array sorted in nondecreasing order.

Constraints:

  • 0m,n2000\leq m, n \leq 200

  • 1m+n2001\leq m + n \leq 200

  • 103-10^3 \leq nums1[i] , nums2[i] 103\leq 10^3

Examples

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.