---
title: "Discussion on \"Vectors in C++: An Introduction\" | Hashnode"
description: "Discussion on \"Vectors in C++: An Introduction\". Vectors are a common data structure used in C++, particularly in the Standard Template Library (STL). They are dynamic arrays that can grow or shrink in size as needed, which makes them an efficient and flexible option for storing and manipulating co..."
url: "https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Vectors in C++: An Introduction](https://saiyashwanth.com/vectors-in-cpp-an-introduction?utm_source=hashnode&utm_medium=feed)

Vectors are a common data structure used in C++, particularly in the Standard Template Library (STL). They are dynamic arrays that can grow or shrink in size as needed, which makes them an efficient and flexible option for storing and manipulating co...

Feb 12, 2023 · 4 min read · saiyashwanth.com  
Read the article

-   [#cpp](https://hashnode.com/tag/cpp)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#data-structures](https://hashnode.com/tag/data-structures)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)
-   [#problem-solving](https://hashnode.com/tag/problem-solving)

## Written by

[Yashwanth Sai](https://hashnode.com/@theyashwanthsai)

@theyashwanthsai

  
[View profile](https://hashnode.com/@theyashwanthsai)

Backend, Machine learning

I am a student developer currently learning backend development and also a competitive programmer who likes to solve algorithmic questions.

## Responses 2

Markdown supported · ⌘↵ to post

[Soham Sarkar](https://hashnode.com/@Sohoxic)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e8af94861f30240f6df623)

I'd recommend adding a few example questions for vector for people to understand it's use-case in problem solving, all d best for future write ups

[Yashwanth Sai](https://hashnode.com/@theyashwanthsai)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e8af94861f30240f6df623#reply-63e8f47dccdc8e25be1e0a89)

Sure sure

[unknown](https://hashnode.com/@unknown7)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e89201861f30240f6df1eb)

i guess its better to use emplace back then push back as what i have read its faster then push back

[unknown](https://hashnode.com/@unknown7)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e89201861f30240f6df1eb#reply-63e8efd7ccdc8e25be1e09c3)

you can go on google and search as i am unable to paste the link in here

[Yashwanth Sai](https://hashnode.com/@theyashwanthsai)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e89201861f30240f6df1eb#reply-63e8f44d861f30240f6dfe88)

Yes it's true. I use emplace\_back in contests as I have heard it is faster

[Yashwanth Sai](https://hashnode.com/@theyashwanthsai)

[Feb 12, 2023](https://hashnode.com/posts/vectors-in-cpp-an-introduction/63e878c45029a52296e10750/comment/63e89201861f30240f6df1eb#reply-63e8f45d861f30240f6dfe8f)

Will surely share a soryce [Yunus Temurlenk](https://hashnode.com/@YunusTemurlenk)
