Cognizant Interview Question

Bubble sorting, swapping of 2 variables