time
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import numpy as np
|
||||
import time
|
||||
|
||||
random_arr = np.random.randint(1,101,10)
|
||||
start = time.time()
|
||||
|
||||
random_arr = np.random.randint(1,2001,2000)
|
||||
|
||||
print(random_arr)
|
||||
|
||||
@@ -16,6 +19,10 @@ while sorted == False:
|
||||
random_arr[index + 1] = temp
|
||||
sorted = False
|
||||
|
||||
end = time.time()
|
||||
total_time = end - start
|
||||
|
||||
print(random_arr)
|
||||
print(f'total time:{total_time} s')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user