Commit a0a73b84 by BellCodeEditor

auto save

parent 6aa57e11
Showing with 20 additions and 6 deletions
sd = [88, 75, 72, 82, 90, 85, 78, 91]
n=len(sd)
for i in range(n-1):
for a in range(0,n-1):
if sd[a]>sd[a+1]:
sd[a],sd[a+1]=sd[a+1],sd[a]
print(sd)
\ No newline at end of file
sb = [88, 75, 72, 82, 90, 85, 78, 91] import time
n=len(sb) li=[]
for a in range(100):
s=time.time()
for i in range(100):
li.append('1')
sc=time.time()
n=len(li)
for i in range(n-1): for i in range(n-1):
for a in range(0,n-1): for a in range(0,n-1):
if sb[a]>sb[a+1]: if li[a]>li[a+1]:
sb[a],sb[a+1]=sb[a+1],sb[a] li[a],li[a+1]=li[a+1],li[a]
print(sb) print(li)
\ No newline at end of file \ No newline at end of file
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