Top "Map" questions

A dictionary maps keys to values allowing efficient retrieval of values by keys.

map vs. hash_map in C++

I have a question with hash_map and map in C++. I understand that map is in STL, but hash_…

c++ map hashmap
Scala best way of turning a Collection into a Map-by-key?

If I have a collection c of type T and there is a property p on T (of type P, …

scala map scala-collections
How to initialize a private static const map in C++?

I need just dictionary or associative array string => int. There is type map C++ for this case. But I …

c++ static map initialization constants
Updating a java map entry

I'm facing a problem that seems to have no straighforward solution. I'm using java.util.Map, and I want to …

java map in-place
In Java 8 how do I transform a Map<K,V> to another Map<K,V> using a lambda?

I've just started looking at Java 8 and to try out lambdas I thought I'd try to rewrite a very simple …

java map lambda java-8 java-stream
UnmodifiableMap (Java Collections) vs ImmutableMap (Google)

Context I need to return a reference to a map that I'm using for a data cache, and I'd like …

java collections map guava
How to remove from a map while iterating it?

How do I remove from a map while iterating it? like: std::map<K, V> map; for(auto …

c++ map c++11
Java HashMap performance optimization / alternative

I want to create a large HashMap but the put() performance is not good enough. Any ideas? Other data structure …

java performance optimization map hashmap
What is the syntax for adding an element to a scala.collection.mutable.Map?

What is the syntax for adding an element to a scala.collection.mutable.Map ? Here are some failed attempts: val …

scala map add mutable put
Difference between map and collect in Ruby?

I have Googled this and got patchy / contradictory opinions - is there actually any difference between doing a map and …

ruby arrays map collect