I made a copy of the passed array to avoid modifying the original one but still don't pass the last requirements