Top "Hashmap" questions

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

What exactly is bucket in hashmap?

Recently, in an interview I was asked, what exactly is a bucket in hashmap? Whether it is an array or …

java linked-list hashmap hashcode bucket
HashMap vs LinkedHashMap performance in iteration over values()

Is there any performance difference between HashMap and LinkedHashMap for traversal through values() function?

java collections hashmap linkedhashmap
Is gcc std::unordered_map implementation slow? If so - why?

We are developing a highly performance critical software in C++. There we need a concurrent hash map and implemented one. …

c++ stl c++11 hashmap concurrenthashmap
in CoffeeScript, how can I use a variable as a key in a hash?

eg: So: foo = "asdf" {foo: "bar"} eval foo # how do I get {"asdf": "bar"} ? # this will throw parse error: {(eval …

coffeescript hashmap literals
Java putting Hashmap into Treemap

I am currently reading 2 million lines from a textfile as asked in the previous question Java Fastest way to read …

java hashmap treemap
How to iterate through a Hashmap, print the key/value and remove the value in Rust?

This should be a trivial task in any language. This isn't working in Rust. use std::collections::HashMap; fn do_…

hashmap rust iteration mutability
Why does Map.of not allow null keys and values?

With Java 9, new factory methods have been introduced for the List, Set and Map interfaces. These methods allow quickly instantiating …

java dictionary null hashmap java-9
Hashtable, HashMap, HashSet , hash table concept in Java collection framework

I am learning Java Collection Framework and got moderated understanding. Now, when I am going a bit further I got …

java hash hashmap hashtable hashset
Iterating through a LinkedHashMap in reverse order

I have a LinkedHashMap: LinkedHashMap<String, RecordItemElement> that I need to iterate through from a given key's position, …

java hashmap linkedhashmap
Writing from hashmap to a txt file

I have a hashMap of Integer,String (K,V) and want to write only the string values to a file (…

java hashmap bufferedreader filewriter