MAERSK interview question

In-depth implementation of array methods