You are viewing a single comment's thread. Return to all comments →
def runningTime(arr): k = 0 for i in range(1, len(arr)): for j in range(i): if arr[i-j] < arr[i-j-1]: arr[i-j], arr[i-j-1] = arr[i-j-1], arr[i-j] k += 1 return k
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 →