Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hash table
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Applications== ===Associative arrays=== {{Main|Associative array }} Hash tables are commonly used to implement many types of in-memory tables. They are used to implement [[associative array]]s.<ref name="clrs">{{citation | last1 = Cormen | first1 = Thomas H. | author1-link=Thomas H. Cormen | author2-link = Charles E. Leiserson|last2=Leiserson|first2=Charles E.|author3-link=Ron Rivest|last3=Rivest|first3=Ronald L.|author4-link=Clifford Stein|last4=Stein|first4=Clifford | title = [[Introduction to Algorithms]] | edition = 2nd | year = 2001 | publisher = [[MIT Press]] and [[McGraw-Hill]] | isbn=0-262-03293-7 | chapter = 11 Hash Tables | pages = 221–252}}.</ref> ===Database indexing=== Hash tables may also be used as [[disk drive|disk]]-based data structures and [[index (database)|database indices]] (such as in [[DBM (computing)|dbm]]) although [[B-tree]]s are more popular in these applications.<ref>{{cite web|url=https://edux.pjwstk.edu.pl/mat/262/lec/rW9.htm|title=Indexes and external sorting|archive-url=https://ghostarchive.org/archive/HW0hp|archive-date=26 March 2022|url-status=dead|access-date=26 March 2022|publisher=[[:pl:Polsko-Japońska Akademia Technik Komputerowych]]|author= Lech Banachowski}}</ref> ===Caches=== {{Main|Cache (computing) }} Hash tables can be used to implement [[cache (computing)|caches]], auxiliary data tables that are used to speed up the access to data that is primarily stored in slower media. In this application, hash collisions can be handled by discarding one of the two colliding entries—usually erasing the old item that is currently stored in the table and overwriting it with the new item, so every item in the table has a unique hash value.<ref>{{cite journal |last1=Zhong |first1=Liang |last2=Zheng |first2=Xueqian |last3=Liu |first3=Yong |last4=Wang |first4=Mengting |last5=Cao |first5=Yang |title=Cache hit ratio maximization in device-to-device communications overlaying cellular networks |journal=China Communications |date=February 2020 |volume=17 |issue=2 |pages=232–238 |doi=10.23919/jcc.2020.02.018 |s2cid=212649328 }}</ref><ref>{{cite web|url=https://www.linuxjournal.com/article/7105|publisher=[[Linux Journal]]|access-date=16 April 2022|date=1 January 2004|title=Understanding Caching|first=James|last=Bottommley|url-status=live|archive-url=https://web.archive.org/web/20201204195114/https://www.linuxjournal.com/article/7105|archive-date=4 December 2020}}</ref> ===Sets=== {{main|Set data structure}} Hash tables can be used in the implementation of [[set data structure]], which can store unique values without any particular order; set is typically used in testing the membership of a value in the collection, rather than element retrieval.<ref>{{cite web|url=https://userweb.cs.txstate.edu/~js236/201412/cs5301/week13.pdf|title=Set & Hash Tables|author=Jill Seaman|archive-url=https://web.archive.org/web/20220401134706/https://userweb.cs.txstate.edu/~js236/201412/cs5301/week13.pdf|archive-date=April 1, 2022|access-date=26 March 2022|publisher=[[Texas State University]]|date=2014|url-status=bot: unknown}}</ref> ===Transposition table=== {{Main|Transposition table}} A [[transposition table]] to a complex Hash Table which stores information about each section that has been searched.<ref>{{Cite web|title=Transposition Table - Chessprogramming wiki|url=https://www.chessprogramming.org/Transposition_Table|website=chessprogramming.org|access-date=2020-05-01|archive-date=February 14, 2021|archive-url=https://web.archive.org/web/20210214110941/https://www.chessprogramming.org/Transposition_Table|url-status=live}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)