Algorithms for insertion sort, merge sort, bubble sort