loading...

re: Daily Challenge #189 - Convert Number into Reversed Array VIEW POST

FULL DISCUSSION
 

Rust one liner:

fn convertNtA(num: i32) -> Vec<u32> {
    num.to_string()
        .chars()
        .map(|c| c.to_digit(10).unwrap())
        .rev()
        .collect()
}
Code of Conduct Report abuse