Austin Theriot cf61af59c5
optimized for loop & corrected comments (#617)
The existing insertion sort implementation began by iterating from
0 until the end of the array, but it is only necessary to
iterate from 1 until the end of the array, since at the
0th index, there is nothing to compare to the left of
the element.

In order to complete this change, I also had to update the tests
to reflect the fact that the algorithm visits each index 1 less
time.

Finally, I corrected the grammar/wording of the comments.

Co-authored-by: Oleksii Trekhleb <trehleb@gmail.com>
2021-01-03 10:26:14 +01:00
..
2020-12-20 19:57:51 +01:00
2020-12-17 09:49:57 +01:00
2020-12-19 21:13:11 +01:00
2020-12-20 20:06:36 +01:00