ka
This commit is contained in:
9
progp/25-2-6/buuble-sort.py
Normal file
9
progp/25-2-6/buuble-sort.py
Normal file
@@ -0,0 +1,9 @@
|
||||
arr_test = [4,5,9,1,3]
|
||||
|
||||
for i in range(len(arr_test)):
|
||||
if arr_test[i] > arr_test[i + 1]:
|
||||
temp = arr_test[i]
|
||||
arr_test[i] = arr_test[i + 1]
|
||||
arr_test[i + 1] = temp
|
||||
|
||||
print(arr_test)
|
||||
Reference in New Issue
Block a user