Commit 06661aec authored by Martin Mareš's avatar Martin Mareš
Browse files

04: Ještě bublinkové třídění

parent ee9cdab0
#!/usr/bin/env python3
# Třídění probubláváním
x = [31, 41, 59, 26, 53, 58, 97]
n = len(x)
for i in range(n):
for j in range(n-1):
if x[j] > x[j+1]:
x[j], x[j+1] = x[j+1], x[j]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment