Skip to content

Instantly share code, notes, and snippets.

View gatarelib's full-sized avatar
Codin'

Gatare Libère gatarelib

Codin'
View GitHub Profile
@gatarelib
gatarelib / InsertionSortAlgo.py
Last active October 8, 2018 05:58
insertion_sort Algo created by ligat - https://repl.it/@ligat/insertionsort-Algo
# Insertion Sort In Python
#
# Performance Complexity = O(n^2)
# Space Complexity = O(n)
def insertionSort(my_list):
# for every element in our array
for index in range(1, len(my_list)):
current = my_list[index]
position = index