Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡️ Speed up function
sorter
by 30,125%
The given code is implementing the bubble sort algorithm, which is not optimal for sorting. We can significantly increase the speed of this function by switching to a more efficient sorting algorithm like Timsort, which is the default sorting algorithm used in Python. Here's the optimized version. This utilizes Python's built-in `sort` method, which is highly efficient with a time complexity of O(n log n).
- Loading branch information