Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 760 Bytes

File metadata and controls

16 lines (11 loc) · 760 Bytes

Merge Sorted Arrays

Problem Description

In order to win the prize for most cookies sold, my friend Alice and I are going to merge our Girl Scout Cookies orders and enter as one unit. Each order is represented by an "order id" (an integer).

We have our lists of orders sorted numerically already, in arrays. Write a function to merge our arrays of orders into one sorted array.

Implementation

My solution completes the merge in O(n) time, and O(n) space, where n represents the total number of elements from both input arrays.