Exploring Basic Concepts
Vector in C++ is a type of STL container which is used for storing elements in…