UST interview question

Sorting and time complexity Swapping with 2 variables