// array3.rs // Here is the code for how the array learns // I AM NOT DONE struct soultion; impl soultion{ pub fn move_zero(nums:&mut Vec){ let mut i=0; for j in 0..nums.len(){ if nums[j] !=0{ nums[i] = nums[j]; i+=1; } } // for loop through for k in i ..nums.len(){ nums[k] = 0; } } } fn main() { let mut v = vec![1,23,0,0,0,3,4,5]; soultion::move_zero( &mut v); println!("v:{:?}",v); }