Commit 526815d
authored
⚡️ Speed up function
Here is a faster implementation of the `sorter` function. The original code uses a **naive bubble sort** (`O(n^2)`), which is very slow for large lists. Instead, this version uses Python’s built-in `sort()` method, which is implemented using **Timsort** and is highly optimized (`O(n log n)`).
**All comments are preserved.**
This will be significantly faster and more memory-efficient than bubble sort, while preserving all behavior and function output.sorter by 86,992%1 parent 66207b5 commit 526815d
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments