Commit 33094b5e by BellCodeEditor

save project

parent 87a482f4
Showing with 5 additions and 3 deletions
alist = [88, 75, 72, 82, 90, 85, 78, 91]
s = 0
cd = len(alist)
for i in range(cd-1):
for j in range(i,cd-1):
if alist[i]>alist[j]:
alist[i] , alist[j] = alist[j] , alist[i]
for j in range(cd-1-i):
s=s+1
if alist[j]>alist[j+1]:
alist[j] , alist[j+1] = alist[j+1] , alist[j]
print(alist)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment