update insertion sort
This commit is contained in:
@ -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]
|
||||
|
||||
Reference in New Issue
Block a user