I have a HashMap as below (assuming it has 10,0000 elements)
HashMap
hm.put(\
I note that you clarify the question by suggesting you might have "100000000 elements". You still won't have duplicates in the HashMap
, because, as two other posters have pointed out, you can't get duplicate keys in a Map
. I'm still not sure we understand the question, though, as it's not at all clear how you expected to generate the block titled "Output", or what you intend to do with it.