Is hashmap similar to graphs in Data Structures ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Is hashmap similar to graphs in Data Structures ?

4th Nov 2016, 4:49 PM
Viraj Singh
Viraj Singh - avatar
2 Answers
+ 4
No, hashmap (a map) consists of key -> value pairs. The map can have a key only once but a value can belong to multiple keys.
4th Nov 2016, 10:03 PM
Tamás Barta
Tamás Barta - avatar
+ 2
Java HashMap is similar to a python dictionary and to a dictionary in general
3rd Jul 2017, 8:22 PM
Łukasz Romanowski
Łukasz Romanowski - avatar