Nuts.com interview question

Coding test was to merge two carts.