Pergunta de entrevista da empresa UST

Sorting and time complexity Swapping with 2 variables