diff --git a/Bubble Sort/16123004.py b/Bubble Sort/16123004.py index c2eabcf..59fa311 100644 --- a/Bubble Sort/16123004.py +++ b/Bubble Sort/16123004.py @@ -1,7 +1,11 @@ l = [ 2,3,4,5,6,8] n = len(l) -for i in n: - # TODO Fill Code here +for i in range(n-1): + for j in range(n-i-1): + if l[j] > l[j+1] : + l[j], l[j+1] = l[j+1], l[j] +print ("Sorted Array:") +print (l) \ No newline at end of file