//! 简单选择排序

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