1 Star 0 Fork 1

王其/托管

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
冒泡排序.py 367 Bytes
Copy Edit Raw Blame History
王其 authored 2021-10-26 16:54 +08:00 . add 冒泡排序.py.
#coding=utf-8
def bubbleSort(data):
n = len(data)
for i in range(n):
for j in range(0, n-i-1):
if data[j] > data[j+1] :
data[j], data[j+1] = data[j+1], data[j]
data = [64, 34, 25, 12, 22, 11, 90]
bubbleSort(data)
print ("排序后的数组:")
for i in range(len(data)):
print ("%d" %data[i])
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wang-qi3206/trusteeship.git
git@gitee.com:wang-qi3206/trusteeship.git
wang-qi3206
trusteeship
托管
master

Search