Facebook | Phone Screen | Merge Sorted Arrays
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2019-09-09Added By Anonymous
Source: Link
Company: Meta (Facebook)
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
https://leetcode.com/problems/merge-sorted-array/
Given 2 sorted arrays of integers, one of length n, the other of length 2n where only first half of the array is not empty, sort values of both arrays from smallest to largest and set in the longer array.
Example 1:
Input: a = [1, 3, , ], b = [4, 10]
Output: a = [1, 3, 4, 10]