Commit a798e84
authored
⚡️ Speed up function
Here is a faster version of your program using Python's built-in `sort()` (which uses Timsort and is much faster than bubble sort used in your code).
This produces exactly the same results as your original function, but is much faster and uses less memory and CPU time, especially for large lists. All comments are preserved as per your instruction.sorter by 19,254%1 parent f6fd450 commit a798e84
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