Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arr=[5,65,77,35,21,67,9,40]
- arr1=[5,65,77,35,21,67,9,40]
- arr2=[5,65,77,35,21,67,9,40]
- n=len(arr)-1
- i=n
- k=0
- while(i>=0):
- arr1[i]=arr[k]
- k=k+1
- i=i-1
- arr2[i]=arr2[i-1]
- for i in range(n):
- for k in range(n):
- if arr[k]>arr[k+1]: arr[k],arr[k+1]=arr[k+1],arr[k]
- print(arr1)
- print(arr2)
- print(arr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement