From 1a64796c7d904eb4382f331e751acff0902674b6 Mon Sep 17 00:00:00 2001 From: rdutta99 <32390451+rdutta99@users.noreply.github.com> Date: Sat, 20 Oct 2018 14:51:25 +0530 Subject: [PATCH] removed tempvar --- bubblesort.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bubblesort.py b/bubblesort.py index c8aa1ed..d5a64f1 100644 --- a/bubblesort.py +++ b/bubblesort.py @@ -27,9 +27,7 @@ def bubbleSort(array): i=0 while (i < length-1): if (array[i] > array[i+1]): - tempVar = array[i] - array[i] = array[i+1] - array[i+1] = tempVar + array[i],array[i+1]=array[i+1],array[i] result = True i=i+1 count+=1