Given two sorted integer arrays `nums1` and `nums2`, merge them into a single sorted array and return the result.
The arrays are sorted in non-decreasing order.
Example 1
Input:nums1 = [1, 2, 3], nums2 = [2, 5, 6]
Output:[1, 2, 2, 3, 5, 6]
Example 2
Input:nums1 = [1], nums2 = []
Output:[1]
Example 3
Input:nums1 = [], nums2 = [1]
Output:[1]
Constraints
- 0 <= nums1.length, nums2.length <= 200
- -10^9 <= nums1[i], nums2[i] <= 10^9
- Both nums1 and nums2 are sorted in non-decreasing order.