Skip to content
Permalink
Browse files
Basics algs break in a more intrutive way
  • Loading branch information
aa9863 committed Mar 29, 2021
1 parent 2ae188b commit d5d46af8614cab91f929da0848d810613f873d36
Showing 1 changed file with 2 additions and 2 deletions.
@@ -35,14 +35,14 @@ def bubblesort(theList):
# Inner Loop,
for inner in range(len(theList)-1):
#Get the values
leftItem = theList[inner]
rightItem = theList[inner+1]
leftItem = theList[inner]

#Do the Comparison
if leftItem > rightItem:
#Swap
theList[inner] = rightItem
theList[inner] = leftItem
theList[inner] = rightItem

logging.debug("Iteration {0} List is {1}".format(outer, theList))

0 comments on commit d5d46af

Please sign in to comment.