Question: Use Python programming language (the assigment #3 code is provided below) Create a Python program that will measure the execution time of your Bubble Sort

Create a Python program that will measure the execution time of your Bubble Sort code for varying problem sizes, and then plots the performance results using Python's matplotlib.pyplot module. Your code must contain two new Python Functions: (1) contains your Bubble Sort code from Assignment #3, and (2) tests if a Python List is sorted in ascending order and returns True if so or False otherwise. Use Python's time module to obtain time values for the purposes of computing elapsed time. from datetime import datetime import random bubble sort method which sort the 1st in ascending order def bubbleSort (1st): s = len(1st) for i in range(S-1): for j in range(0,s-i-1): if(sttil > Ist[j+1]): 1st [31, 1st[i+1] - 1st [j+1], 1st[3 display method to show the content of list 10 numbers per line def display (1st): i - 0 while(i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
