Pergunta de entrevista da empresa Gainsight

Quick sort code and questions about time complexity