Flowchart (ISO 5807)
Source code
Python
def bubble_sort(a):
n = len(a)
for i in range(n):
for j in range(n - i - 1):
if a[j] > a[j + 1]:
a[j], a[j + 1] = a[j + 1], a[j]
return aThe editor opens with this code — change it and the chart redraws.
- Language
- Python
- Constructs
- nested loops + swap
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG