Top "Hashmap" questions

A data structure that uses a hash function to map identifying values, known as keys, to their associated values

Difference between hash_map and unordered_map?

I recently discovered that the implementation of the hash map in C++ will be called unordered_map. When I looked …

c++ stl hashmap unordered-map
Building ordered JSON String from LinkedHashMap

I had a need for having Key/Value pairs in the order of my insertion, so I opted to use …

java json string hashmap linkedhashmap
Java - Write hashmap to a csv file

I have a hashmap with a String key and String value. It contains a large number of keys and their …

java csv hashmap supercsv
How to correctly use HashMap?

HashMap savedStuff = new HashMap(); savedStuff.put("symbol", this.symbol); //this is a string savedStuff.put("index", this.index); //this is …

java data-structures map hashmap key-value
Collectors.groupingBy doesn't accept null keys

In Java 8, this works: Stream<Class> stream = Stream.of(ArrayList.class); HashMap<Class, List<Class>&…

java hashmap java-8 java-stream collectors
Java Pass By Value and Pass By Reference

i have done the following sample with to check my knowledge import java.util.Map; public class HashMap { public static …

java hashmap pass-by-reference pass-by-value
Using java.util.Map in h:dataTable

I need to display Map using <h:dataTable>. My backing bean has a Map property as below: public …

jsf datatable hashmap treemap
Why hashmap lookup is O(1) i.e. constant time?

If we look from Java perspective then we can say that hashmap lookup takes constant time. But what about internal …

data-structures hash hashmap hashtable big-o
What are hashtables and hashmaps and their typical use cases?

I have recently run across these terms few times but I am quite confused how they work and when they …

language-agnostic hashtable hashmap
Scrapy Crawl URLs in Order

So, my problem is relatively simple. I have one spider crawling multiple sites, and I need it to return the …

python sorting asynchronous hashmap scrapy