In Java, how can I create an array where each element is a list of objects containing a pair of keys.
Then given an index of this array, I should be able to search the list at the index provided a single key value and retrieve the corresponding value.
Problem Statement
I have around 2 million webpage name and corresponding to each name are categories (one or more) .
I can hash them down to say 1,00,000 using some hash function but obviously their will be collisions.
I want to build a data structure in Java that can store all this information, and then given a webpage and then, after hashing, given the index, I can find the categories of the web page.