r/javahelp • u/Correct_Classroom • Mar 15 '20
Hashmap
What is the simplest hashmap you can code? I'm thinking of an int[] array with linkedlist at each index? Is there any other way? also please provide code, I'm stuggling to code one perfectly?
0
Upvotes
1
u/lookForProject Mar 15 '20
I never build one, but my first guess/try would be: two arrays. One for key, one for value. The value is the bucket. Most simplest solution would be making bucket that's just an array.