Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sh2aliyev/notes/llms.txt
Use this file to discover all available pages before exploring further.
| Stable? | Time | Space |
|---|---|---|
| Yes | O(n^2) | O(1) |
Explanation
Go through the list and compare each adjacent pair. If they are in the wrong order, swap them. After one full pass, the largest element moves to the end, so the next pass can skip it and check one less element. Repeat until a full pass finishes with no swaps.
Implementation
Bubble Sort