Visualization of a sorting algorithm