Datadog Interview Question

coding challenge was to sort an array