1. Algorithm Description: Bubble Sort is a simple comparison-based sorting algorithm. It repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
2. Steps of Bubble Sort:
3. Time Complexity: O(n²) in the worst and average case, and O(n) in the best case (when the array is already sorted).
4. Space Complexity: O(1), as it operates in-place.
5. Stability: Bubble Sort is a stable algorithm.
6. Optimizations: Early termination if no swaps are made in a pass.