Suppose a list of integers is (5, 7, 2, 9, 11, 10, 12). Suppose we conduct the bubble sort algorithm on this list. def B
Posted: Thu May 12, 2022 7:18 am
Suppose a list of integers is (5, 7, 2, 9, 11, 10, 12). Suppose we conduct the bubble sort algorithm on this list. def BubbleSort(a): n = len(a) for i in (0, n): for j in range(0, n-i-1): if a[j] > a [j+1] ! > temp = a[j] a[j] = a[j+1] a[j+1] = temp return a What are the values of the following (where n is the length of the list)? n = a[1] = a(5) When i = 1 and j=1 enter the correct values for the following variable: a[1] a[5] =
return a What are the values of the following (where n is the length of the list)? n = a[1] a[5] When i = 1 and j = 1 enter the correct values for the following variable: a[1] = a[5] - When i = 2 and j = 1 enter the correct values for the following variable: a[2] a[6]
return a What are the values of the following (where n is the length of the list)? n = a[1] a[5] When i = 1 and j = 1 enter the correct values for the following variable: a[1] = a[5] - When i = 2 and j = 1 enter the correct values for the following variable: a[2] a[6]