冒泡排序:#includeusingnamespacestd;intv=0;templateclasslink{public:Tdata;intpre,next;link():pre(-1),next(-1){}};templatevoidsort(link*&x,inthead,intrear){v=0;boolflag=1,val=0;while(flag){flag=0;intp=head;whi