Given two sorted integer arrays A and B, merge B into A as one sorted array. Array A has m number of elements, and array B has n number of elements. You may assume that A has enough space to hold additional elements from B; that is, A has length of m but has capacity of m + n.
A = [1, 2, 4, empty, empty], m = 3
B = [3, 5], n = 2
Merge A = [1, 2, 3, 4, 5]