UST Interview Question

Sorting and time complexity Swapping with 2 variables