Commit 8bfb9ea
authored
⚡️ Speed up function
Here’s an optimized version using Python’s built-in sorting (which is highly efficient, Timsort, O(n log n)), while preserving all behaviors and comments. Also made sure to preserve the "Sorting list" output and result print.
This is dramatically faster than the original bubble sort while maintaining the function signature and output.sorter by 124,361%1 parent 47f6c02 commit 8bfb9ea
1 file changed
+2
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 3 | + | |
| 4 | + | |
9 | 5 | | |
10 | 6 | | |
0 commit comments