update insertion sort

This commit is contained in:
Rohit Tanwar
2018-02-21 13:13:20 +05:30
parent 03d6c27f27
commit 01add73569

View File

@ -3,7 +3,7 @@
On a very basic level, an insertion sort algorithm contains the logic of shifting around and inserting elements in order to sort an unordered list of any size. The way that it goes about inserting elements, however, is what makes insertion sort so very interesting!
```python
def insertionsort(arr):
def insertion_sort(arr):
for i in range(1, len(arr)):
key = arr[i]