In the Optimized bubble sort algorithm, If there are no swaps then the array becomes in sorted order. Fill the below blank to run the Optimized bubble sort algorithm behaviour.

def bubble_sort(array):
  for i in range(len(array)):
    swapped = False
    for j in range(0, len(array) - i - 1):
      if array[j] > array[j + 1]:
        temp = array[j]
        array[j] = array[j+1]
        array[j+1] = temp
        swapped = True
    if not swapped:
      ________________ ?
data = [-2, 45, 0, 11, -9]
bubble_sort(data)
print(data)

1
break
2
go to
3
continue
4
return 0

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation