uShip interview question

Array manipulation