Forums Register Login

Using lookup in Hash tables

+Pie Number of slices to send: Send
I am taking my first course in Java, and I am way off base.
I'm trying out exercises from The Practice of Programming book. I'm working on this exercise:

Change lookup so that if the average list length becomes more than x, the array is grown automatically by a factor of y and the hash table is rebuilt.

Any help will do..
+Pie Number of slices to send: Send
It sounds like you're coding your own hashtable there, instead of using Java's Hashtable class. I bet a C programming language newsgroup would be a good place for a question like that, if you don't find people that 'roll their own' hashtable here.
+Pie Number of slices to send: Send
Thanks for the response Cindy.
This is actually a Java course, so I'm stuck on figuring out where to start, etc.
+Pie Number of slices to send: Send
Well, maybe this will help. Animation of Hash Table

It shows you in a Java applet, how a hash table works. Click the 'Execute' button, then the 'Run' button, to see it insert numbers into a hashtable one by one, while simultaneously showing the code it's executing.

It offers several different hash algorithms to watch.
Every plan is a little cooler if you have a blimp. And a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 835 times.
Similar Threads
HashMap Parameters
Head First page 92 Pool Puzzle
what is load factor of hashset ???
It is enough for becoming a junior developer
What have I done that causes HashSet to permit the addition of a duplicate to itself?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:48:15.