vecs1 solution

This commit is contained in:
mo8it
2024-06-20 01:00:06 +02:00
parent 0abcdeed42
commit a9f0c7bf1f
3 changed files with 32 additions and 11 deletions
+3 -2
View File
@@ -307,8 +307,9 @@ hint = """
In Rust, there are two ways to define a Vector.
1. One way is to use the `Vec::new()` function to create a new vector
and fill it with the `push()` method.
2. The second way, which is simpler is to use the `vec![]` macro and
define your elements inside the square brackets.
2. The second way is to use the `vec![]` macro and define your elements
inside the square brackets. This way is simpler when you exactly know
the initial values.
Check this chapter: https://doc.rust-lang.org/stable/book/ch08-01-vectors.html
of the Rust book to learn more.