![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
liuyangguo1995
这个作者很懒,什么都没留下…
展开
-
冒泡排序python
文章目录1、代码程序:2、输出结果: 1、代码程序: #冒泡排序函数 def bubble_sort(lists): count = len(lists); for k in range(count): for j in range(count-1): if lists[j]>lists[j+1]: lists[j],lists[j+1] = lists[j+1],lists[j]; print(lists原创 2020-06-08 14:41:15 · 590 阅读 · 0 评论 -
冒泡排序C++
文章目录1、代码程序2、输出结果: 1、代码程序 #include <iostream> using namespace std; //序列输出函数 void print(int arr[], int n) { for(int j = 0;j<n;j++) { cout<<arr[j]<<" "; } cout<<endl; } //冒泡排序函数 void BubbleSort(int arr[],int原创 2020-06-08 11:58:21 · 145 阅读 · 0 评论