起泡排序

#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];
相關文章
相關標籤/搜索