code/languages/cpp/vector_to_map/readme.md
Maps are a part of the C++ Standard Template Library maps are used to replicate associative arrays. maps contains sorted key-value pair , in which each key is unique and cannot be changed and it can be inserted or deleted but cannot be altered. Each element has a key value and a mapped value. No two mapped values can have same key values. Maps store the key values in ascending order by default
Vectors are part of the C++ Standard Template Library. vector can provide memory flexibility. vector being a dynamic array, doesn't need size during declaration vectors are like arrays that are used to store elements of similar data types. However, unlike arrays, the size of a vector can grow dynamically. i.e we can change the size of the vector during the execution of a program as per our requirements. The vector class provides various methods to perform different operations on vectors.
Vector of maps can be used to design complex and efficient data structures.
Link to the article: https://iq.opengenus.org/convert-vector-to-map-in-cpp/