Which One Is Better: Map of Vectors, or Multimap?—Jonathan Boccara

Save to:
Instapaper Pocket Readability

Depends!

Which One Is Better: Map of Vectors, or Multimap?

by Jonathan Boccara

From the article:

While advising on how to make code more expressive on the SFME project, I came across an interesting case of choosing the right data structure, which I’ll share with you with the permission of the authors of the projects.

We had to associate a key with several values, and perform various operations. Should we use a map of vectors, or is a multimap more appropriate? Let’s see the case in more details, and compare the two solutions...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.