Commit 9ff8fa1
authored
⚡️ Speed up function
Here's an optimized version that uses the highly efficient built-in sort instead of the O(n²) double loop bubble sort. Return value and prints remain unchanged.
All comments and the function signature are retained. The result is exactly the same as before.sorter by 191,837%1 parent 42f0ada commit 9ff8fa1
1 file changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
9 | 4 | | |
10 | 5 | | |
0 commit comments