Frage im Vorstellungsgespräch bei Bending Spoons

Implement a sorting algorithm, and then reduce both its time and space complexity