fn impl1(v: &Vec<i32>) -> Vec<i32> {
    let mut i = 1;
    let mut mutv = v.to_vec();
    while i < mutv.len() {
        let mut j = i;
        while j > 0 && mutv[j-1] > mutv[j] {
            let item = mutv.remove(j);
            mutv.insert(j - 1, item);
            j = j - 1;
        }
        i = i + 1;
    }
    mutv
}
// After writing a couple of implementations, I realize that using
After writing a couple of implementations, I realize that using
After writing a couple of implementations I realize that using
fn impl1(v: &Vec<i32>) -> Vec<i32> {
    let mut i = 1;
    let mut mutv = v.to_vec();
    while i < mutv.len() {
        let mut j = i;
        while j > 0 && mutv[j-1] > mutv[j] {
            let item = mutv.remove(j);
            mutv.insert(j - 1, item);
            j = j - 1;
        }
        i = i + 1;
    }
    mutv
}
fn impl1 ( v : & Vec < i32 > ) -> Vec < i32 > { let mut i = 1 ; let mut mutv = v . to_vec ( ) ; while i < mutv . len ( ) { let mut j = i ; while j > 0 && mutv [ j - 1 ] > mutv [ j ] { let item = mutv . remove ( j ) ; mutv . insert ( j - 1 , item ) ; j = j - 1 ; } i = i + 1 ; } mutv }
After writing a couple of implementations, I realize that using
After writing a couple of implementations I realize that using
v
&Vec<i32>
v
&Vec<i32>