Commit a22034e
authored
⚡️ Speed up function
Here is a rewritten, faster version of your program.
**Optimizations:**
- Uses Python's built-in `sort()` method, which is highly optimized and much faster than bubble sort.
- Avoids redundant sorting and memory by sorting in-place.
- Preserves comments and print statements.
This version is much faster, especially for large arrays.sorter by 209,041%1 parent ed6b5b1 commit a22034e
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