You are viewing a single comment's thread. Return to all comments →
#python3 def runningTime(arr): z=0 if arr==sorted(arr): return (0) else: for i in range(1,len(arr)): x=arr[i] for j in range(i): if arr[j]>x: (arr[i],arr[j])=(arr[j],arr[i]) z+=1 return z
Seems like cookies are disabled on this browser, please enable them to open this website
Running Time of Algorithms
You are viewing a single comment's thread. Return to all comments →