pub fn collecting_numbers(numbers: Vec<u64>) -> u64 {
    let max: u64 = numbers.len() as u64;
    let mut iterations: u64 = 0;
    let mut current: u64 = 0;
    while current < max {
        iterations += 1;
        for &i in numbers.iter() {
            if i == current + 1 {
                current = i;
            }
        }
    }
    iterations
}
/// Returns the number of rounds required to collect every number 1..n in increasing order, when reading the array from left to right, always only picking numbers in order.
Returns the number of rounds required to collect every number 1..n in increasing order, when reading the array from left to right, always only picking numbers in order.
Returns the number of rounds required to collect every number 1 .. n in increasing order when reading the array from left to right always only picking numbers in order .
pub fn collecting_numbers(numbers: Vec<u64>) -> u64 {
    let max: u64 = numbers.len() as u64;
    let mut iterations: u64 = 0;
    let mut current: u64 = 0;
    while current < max {
        iterations += 1;
        for &i in numbers.iter() {
            if i == current + 1 {
                current = i;
            }
        }
    }
    iterations
}
pub fn collecting_numbers ( numbers : Vec < u64 > ) -> u64 { let max : u64 = numbers . len ( ) as u64 ; let mut iterations : u64 = 0 ; let mut current : u64 = 0 ; while current < max { iterations += 1 ; for & i in numbers . iter ( ) { if i == current + 1 { current = i ; } } } iterations }
Returns the number of rounds required to collect every number 1..n in increasing order, when reading the array from left to right, always only picking numbers in order.
Returns the number of rounds required to collect every number 1 .. n in increasing order when reading the array from left to right always only picking numbers in order .
numbers
Vec<u64>