Q:

Explain the difference between a map and a set

0

 Explain the difference between a map and a set. When might you use one or the other?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

A `map` is a collection of key-value pairs. When we want a container acting like dictionary, we should choose `map`.

A `set` is a collection of keys. When we want to check if some values are present, we can choose `set`.

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now