human
Comb Sort | To find next gap from current.
Shrink gap by Shrink factor.
Function to sort arr [ ] using Comb Sort.
Initialize gap.
Initialize swapped as true to make sure that loop runs.
Keep running while gap is more than 1 and last iteration caused a swap.
Find next gap.
Initialize swapped as false so that we can check if swap happened or not.
Compare all elements with current gap.
.
.
Driver code to test above"
Solution in Python:
assistant
#Here is code to comb Sort and the other steps required.
 def getNextGap ( gap ) :
	gap = ( gap * 10 ) / 13
	if gap < 1 :
		return 1
	return gap
def combSort ( arr ) :
	n = len ( arr )
	gap = n
	swapped = True
	while gap != 1 or swapped == 1 :
		gap = getNextGap ( gap )
		swapped = False
		for i in range ( 0 , n - gap ) :
			if arr [ i ] > arr [ i + gap ] :
/ * Swap arr [ i ] and arr [ i + gap ] * /
	arr [ i ] , arr [ i + gap ] = arr [ i + gap ] , arr [ i ]
/ * Set swapped * /
	swapped = True
arr = [ 8 , 4 , 1 , 3 , - 44 , 23 , - 6 , 28 , 0 ]
combSort ( arr )
print ( " Sorted ▁ array : " )
for i in range ( len ( arr ) ) :
	print ( arr [ i ] ) ,