You are viewing a single comment's thread. Return to all comments →
my solution was like this but due to exceeded time limit error it didn't work in every test cases.
b=0 for i in range(1,n): arr[i] for j in arr[:i]: if arr[i]<j: b+=1 print(b)
Seems like cookies are disabled on this browser, please enable them to open this website
Insertion Sort Advanced Analysis
You are viewing a single comment's thread. Return to all comments →
my solution was like this but due to exceeded time limit error it didn't work in every test cases.