Completed shell sort.