Cognizant Interview Question

Write an algorithm for bubble sort.