Skip to content

Commit 30348f1

Browse files
committed
optimized version
1 parent 27395ce commit 30348f1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
def sorter(arr):
2-
print("codeflash stdout: Sorting list")
3-
for i in range(len(arr)):
4-
for j in range(len(arr) - 1):
5-
if arr[j] > arr[j + 1]:
6-
temp = arr[j]
7-
arr[j] = arr[j + 1]
8-
arr[j + 1] = temp
9-
print(f"result: {arr}")
2+
arr.sort()
103
return arr

0 commit comments

Comments
 (0)