Try this exercise. Click the correct answer from the options.
Which of the following is NOT a best practice for working with vectors? (Choose the most appropriate option)
Click the option that best answers the question.
- Avoid using push_back() to add elements
- Reserve memory in advance if the size of the vector is known
- Use the at() function instead of the bracket operator [] for accessing elements
- Avoid reallocation of vector memory when inserting elements