U
U
Username2016-01-23 22:20:16
Programming
Username, 2016-01-23 22:20:16

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

1 answer(s)
S
Sergey, 2016-01-23
Protko @Fesor

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 question

Ask a Question

731 491 924 answers to any question