Lenovo Interview Question

Write an algorithm to demonstrate bubble sort.