Merge Sort algorithm is fast but it requires additional array and additional copying. Quick Sort is even faster than Merge Sort. Implement Quick Sort algorithm and animate it! Here is
What will happen to a large number of randomly moving objects if you let them follow only one rule: try to move in the same direction as your neighbors do.