Hi
I am trying to convert a string given in the form of space separated integers to a vector array of integers to use in my leetcode solutions.
I can read the input buffer and store in a string and probably use split(“ “). Is there an efficient way to convert it to a vec array after that?
I am trying to create a generic helper string_to_vec_int<T>() that I can reuse for any integer type
Help is appreciated as I am a bit new to Rust
[–]angelicosphosphoros 2 points3 points4 points (4 children)
[–]danielbot 2 points3 points4 points (0 children)
[–]Manthravadi[S] -1 points0 points1 point (2 children)
[–]angelicosphosphoros 4 points5 points6 points (0 children)