Cognizant interview question

What is the method behind bubble sort