Answer the question
In order to leave comments, you need to log in
What is the difference between pair and map?
Good afternoon. What is the difference between the two containers if they both store the key, value,
Answer the question
In order to leave comments, you need to log in
pair is a single key -> value pair, map is a collection of key -> value pairs or a hash map in the general sense.
Sometimes it's more efficient to store a small array of pairs than a small collection of maps. Well, for a single map element, using it is clearly not very efficient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question