AmigoSet (part 2)

  • 30
  • Locked
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 m
You can't complete this task, because you're not signed in.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Coboliste
Level 46 , Casablanca, Morocco
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.