冒泡排序--Python

tech2023-09-26  105

def bubbleSort(a): length = len(a) for i in range(length): for j in range(length - 1 - i): if a[j] > a[j + 1]: a[j], a[j+1] = a[j+1], a[j] return a

 

参考:

https://www.cnblogs.com/bigdata-stone/p/10464243.html

最新回复(0)