Skip to content

Commit 25be011

Browse files
djeadaCopilot
andauthored
Update notes/sorting.md
Co-authored-by: Copilot <[email protected]>
1 parent 2c2560a commit 25be011

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notes/sorting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ Sorted! ✅
177177

178178
**Optimizations**
179179

180-
* This makes Bubble Sort’s **best case** much faster ($O(n)$).
180+
* By keeping track of whether any swaps were made during a pass, Bubble Sort can terminate early if the array is already sorted. This optimization makes Bubble Sort’s **best case** much faster ($O(n)$).
181181

182182
**Stability**
183183

0 commit comments

Comments
 (0)