//! 冒泡排序

pub fn sort<T:Copy + PartialOrd>(data:&mut Vec<T>){
	let mut tmp;
	let n = data.len();
	for i in (1..n).rev(){
		for j in 1..i+1{
			if data[j] < data[j-1]{
				tmp = data[j];
				data[j] = data[j-1];
				data[j-1] = tmp;
			}
		}
	}
}
