Bubble Sort (EN)
TermSimple sorting algorithm with quadratic time complexity
Bubble Sort Visualization
flowchart TD A[Start] --> B[Unsorted List] B --> C{Loop i from 0 to n-1} C --> D{Loop j from 0 to n-i-2} D --> E{Compare Element[j] and Element[j+1]} E -->|Element[j] > Element[j+1]| F[Swap Elements] E -->|Element[j] ≤ Element[j+1]| G[Continue with next j] F --> G G --> H{All j completed?} H -->|No| D H -->|Yes| I{All i completed?} I -->|No| C I -->|Yes| J[List Sorted] J --> K[End]