起泡排序

#include<stdio.h> //一趟bubble数组a[lo,hi)内最大的元素归位到hi-1 void bubble( int a[], int lo, int hi){ for( int i = lo; i < hi-1; ++i){ if( a[i+1] < a[i] ){ int temp = a[i+1];
相关文章
相关标签/搜索