Question: Code in Python please Goal: 10 pts] As discussed in class, bubble sort is a simple sorting algorithm that works by repeatedly stepping through the
![Code in Python please Goal: 10 pts] As discussed in class,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f917db9306f_60366f917db2413a.jpg)
Code in Python please
Goal: 10 pts] As discussed in class, bubble sort is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. Write the function bubbleSort(numList) that takes an unsorted list of numbers and uses the bubble sort algorithm to return the sorted list. The function should also returns a dictionary with the state of the list after each complete pass. erator Your code will not get credit if you use them EXAMPLES >>>bubbleSort ([2,3,5, 4,1]) Second returned value, the sorted list This is another valid output: >bubbleSort ([2,3,5,4,1]) Second returned value, the sorted list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
