We won't re-invent the mechanism for working with hashes — It has already been implemented in lots of collections. We'll grab HashMap and use it. 1. Create a private Object PRESENT constant and initialize it with an Object. This will be our stub. 2. Create a private transient HashMap
AmigoSet (part 2)
You must be signed in to leave a comment
6 February, 21:17
Hello everyOne, Does anyone please know why we have to use the following formula to calculate the initial capacity of the map according to the requirements ? int capacity = Math.max(16, (int)Math.ceil(collection.size()/.75f)); Thanks for the answer.