From ce281fb00ef7ab3bef8c50b889596ea288c11286 Mon Sep 17 00:00:00 2001 From: "codeflash-ai[bot]" <148906541+codeflash-ai[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 23:01:11 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Speed=20up=20function=20`s?= =?UTF-8?q?orter`=20by=20N/A=20in=20PR=20#107=20(`temp`)=20Removed=20the?= =?UTF-8?q?=20unused=20variable=20`unused=5Fvar`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bubble_sort.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bubble_sort.py b/bubble_sort.py index 6e7b176..46b429e 100644 --- a/bubble_sort.py +++ b/bubble_sort.py @@ -1,9 +1,4 @@ def sorter(arr): - unused_var = None for i in range(len(arr)): for j in range(len(arr) - 1): if arr[j] > arr[j + 1]: - temp = arr[j] - arr[j] = arr[j + 1] - arr[j + 1] = temp - return arr