End Sort Using Python



A = []
user_input = input()
A = user_input.split(" ")
Asort = sorted(A)
count = 0
for i in range(len(A)):
    if A[i] == Asort[count]:
        count = count+1
print(len(A)-count)

Comments

Post a Comment