Commit 06661aec authored by Mareš Martin's avatar Mareš Martin
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]
print(x)
Markdown is supported
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