You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here’s an optimized version that replaces the O(n²) bubble sort with Python's highly-efficient built-in `sort()`, which runs in O(n log n) time and uses less memory by sorting in-place, while preserving all the comments and output.
This preserves the behavior and signature exactly while greatly improving performance.
0 commit comments