I'm trying to implement one, but can't find out why? Is the advantage that the only way someone can find out a piece of information in a database is if they have the correct hash algorithm?
Three answers:
CowboyCoder
2008-07-24 12:48:24 UTC
A Hash Table, also known as a Dictionary.
The main purposes is fast searches.
It is basically an array, and because of the hash function, finding an item in the array is simple... just run what you are looking for through the hash function , and you know where to look.
Let's see what wikipedia says :)
http://en.wikipedia.org/wiki/Hash_table
anonymous
2016-11-13 11:56:32 UTC
some factor to make sparkling. the version between those techniques is mor than basically velocity. The is a convenience and capacity difference between them besides. Arrays would be quickest often because of the fact they're direct accesses. provide an index get a value. You loss scalablity. link checklist may be next quickest yet you have administration of the implementation now and back and you will possibly desire to clutter it up. additionally to get a value is greater memory accesses might desire to be accomplished. So technically slower however the preparation length isn't predetermined. final is a hash because of the fact it provides content fabric addressable get admission to to the preparation. in case you do not desire that function and the over head it provides then you particularly would not use it. yet once you desire the function and the implementation is a solid one this information shape might desire to be swifter than something the properly-known programmer might desire to write on there very own. because of the fact those 3 techniques are actually not rather the comparable asserting that's the quickest relies upon. on the subject being solved. If the subject optimally desires the helpful factors provided via the technique then it will be the quickest. Your secondary question approximately springing up a hash out of a array or a related checklist shows this difference. some issues the array attitude would be swifter ands others the related checklist attitude would be swifter. it relies upon on how often and in what way the subject desires to,probe back into the form after advent.
Brady
2008-07-24 12:47:49 UTC
Most upper level languages have hash tables already implemented. The advantage is their efficiency with inserting new entries and, if used properly, searching for an entry.
http://en.wikipedia.org/wiki/Hash_table
Hashing is a type of obstruction used in security, but would not apply to a hash table. For information about hashing used for security: http://en.wikipedia.org/wiki/Cryptographic_hash_function
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.