Becrypt interview question

Without looking online, but providing a mathematical description, implement bubble sort