SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def main():
  2.  
  3.     total = 0
  4.  
  5.     for i in range(5):
  6.         n = 10 #10 integers in list
  7.         myList = [i for i in range(n)]
  8.         random.shuffle(myList)
  9.         startTime = time.time()
  10.         bubbleSort(myList)
  11.         endTime = time.time()
  12.         total += endTime - startTime
  13.    
  14.     average = total / 5
  15.     print(average)  
  16.  
  17. main()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top