#Sorting#Computer-Science#CS251 This is a variation of Insertion Sort, we basically run insertion sort with a bigger gap between the indices we compare instead of one.
With a gap of 1, it’s just insertion sort.
Compare the connected items and swap them if needed
This has to repeat multiple times with smaller and smaller gaps each time
Kind of shifts larger and smaller values around, but doesn’t necessarily sort after the first pass