Top "Map" questions

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

How to convert a Map to List in Java?

What is the best way to convert a Map<key,value> to a List<value>? Just …

java list collections map
Difference between HashMap, LinkedHashMap and TreeMap

What is the difference between HashMap, LinkedHashMap and TreeMap in Java? I don't see any difference in the output as …

java map
Determine if map contains a value for a key?

What is the best way to determine if a STL map contains a value for a given key? #include <…

c++ stl map
What does the "map" method do in Ruby?

I'm new to programming. Can someone explain what .map would do in: params = (0...param_count).map

ruby map range enumeration
Create Map in Java

I'd like to create a map that contains entries consisting of (int, Point2D) How can I do this in …

java map
delete map[key] in go?

I have a map: var sessions = map[string] chan int{} How do I delete sessions[key]? I tried: sessions[key] = …

map go
How to putAll on Java hashMap contents of one to another, but not replace existing keys and values?

I need to copy all keys and values from one A HashMap onto another one B, but not to replace …

java map hashmap
How to check if std::map contains a key without doing insert?

The only way I have found to check for duplicates is by inserting and checking the std::pair.second for …

c++ stl map
Map to String in Java

When I do System.out.println(map) in Java, I get a nice output in stdout. How can I obtain …

java map tostring
How to update std::map after using the find method?

How to update the value of a key in std::map after using the find method? I have a map …

c++ map stl stdmap