thedufer/VisualSort — pull request #15 by betaveros (2014-10-18 11:54:44+00:00)
Title: Simplify insertion sort and add a version using swaps

* It's not necessary to use a break in the original insertion sort
logic; an extra condition in the loop will do just fine.
* Insertion is an unavoidable O(n) cost in traditional
insertion sort (unlike its usage in the other sorts, where the
operations that correspond to what it's used for are O(1) if
additional memory is used). The version using swaps better reflects
its time complexity.