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