u:57 冒泡排序的函数模板 template <typename Element Type void Sort Bubble(element Type *a, int size)( int i work. Element Type temp for (int pass =1; pass<size; pass++)i work 1 for (i=0; i<size-pass; i++)( if(a[i]>a[i+1]){ temp a li]; ali]= a[i+1]; a[i+1]= temp work =0 if work break21:17:57 3. 冒泡排序的函数模板 template <typename ElementType> void SortBubble(ElementType *a,int size){ int i,work; ElementType temp; for(int pass =1;pass<size;pass++){ work = 1; for(i=0;i<size-pass;i++){ if(a[i]>a[i+1]){ temp = a[i];a[i] = a[i+1];a[i+1] = temp; work = 0; } } if (work) break; } }