Bubble sort implemented by turing machine