Frage im Vorstellungsgespräch bei Amazon

there was a coding question related to algorithms and sorting an array.