Vector vs. Map

Vector vs. Map

- Vectors are used to store contiguous elements like an array. However, unlike arrays, vectors can be resized. Maps on the other hand contain unique key/value pairs and sorted by keys.
- For example, a telephone guide where a key would be the name initial and value will be the number.

Vector vs. Map:

In a vector, all the elements are in a sequence whereas Map stores element in the form of a key-value association pair.
object oriented language(OOPS) elements - List the elements of an object oriented language
object oriented language(OOPS) elements - Elements of an object oriented language, characteristics of Object Oriented programming language, basic Concepts used in the Object-Oriented Programming language.
C++ constructors & destructors related inteview questions and answers
C++ constructors and destructors - Explain the use of Constructors, Explain the use of Destructors, Explain constructors and destructors, What are constructors?, What is a destructor?
C++ access privileges - Define access privileges in C++.
C++ access privileges - You have access privileges in C++ such as public, protected and private that helps in encapsulation of data..
Post your comment