CPSC170A
Fundamentals of Computer Science II

Lab 23

Sorting

Insertion Sort

Write the C++ function void insertion_sort(int array[], int size) that sorts the array, in place, using the insertion sort algorithm.


Bubble Sort

Write the C++ function void bubble_sort(int array[], int size) that sorts the array, in place, using the bubble sort algorithm.