challenge: find 2 most important ints from array

Miscellaneous Forums/General Discussion/challenge: find 2 most important ints from array

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I still don't really understand why. But we are getting closer.

"If you know you're going to need to store say 50 elements, and you make you're hash table 150 elements big, you'll have very few collisions (if any), and so it'll basically be just as fast as an array lookup"

I'm only unclear on this bit here. What is the hashtable doing that enables it to be faster here. Doesn't it still have to look at all the possible options? I'm missing some key piece of info here that muddles up my brain.