IBA interview question

Write the bubble sort algorithm