Which data structure should i use to store and retrieve the following data?
(key1,val1)(key1,val2)(key1,val3)(key2,val4)(key2,val5)(key2,val6)(key3,val7)(key3,val8)(key3,val9)
Please help me.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Take a look at Google Guava’s Multimap and its subtypes ListMultimap and SetMultimap.
From Multimap’s javadoc: A collection similar to a Map, but which may associate multiple values with a
single key.