Bubble sort completed by Peter.