zpostcode
hash table
Feb 10, 2026 1:34 PM

  hash table computer science Actions Cite verifiedCite While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Select Citation Style MLA APA Chicago Manual of Style Copy Citation Share Share Share to social media Facebook X URL https://www.britannica.com/topic/hash-table Give Feedback Feedback Corrections? Updates? Omissions? Let us know if you have suggestions to improve this article (requires login). Feedback Type Select a type (Required) Factual Correction Spelling/Grammar Correction Link Correction Additional Information Other Your Feedback Submit Feedback Thank you for your feedback Our editors will review what you’ve submitted and determine whether to revise the article.

  Print Cite verifiedCite While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Select Citation Style MLA APA Chicago Manual of Style Copy Citation Share Share Share to social media Facebook X URL https://www.britannica.com/topic/hash-table Feedback Written by Stephen Eldridge Stephen Eldridge is a writer and editor of fiction and nonfiction for all ages. Stephen Eldridge Fact-checked by The Editors of Encyclopaedia Britannica Encyclopaedia Britannica's editors oversee subject areas in which they have extensive knowledge, whether from years of experience gained by working on that content or via study for an advanced degree. They write new content and verify and edit content received from contributors. The Editors of Encyclopaedia Britannica Last Updated: Nov 5, 2024 • Article History Table of Contents Ask the Chatbot a Question Ask the Chatbot a Question hash table, in computer science, a dictionary that maps keys to values using a hash function. A hash function is a mathematical function that maps data of arbitrary length to data of a fixed length. Hashing is a highly efficient way of performing certain operations, such as searches, insertions, and deletions. Hash functions are also widely used in cryptography, though not commonly in the form of hash tables.

  A hash table allows stored data to be retrieved from a table more quickly than a simple binary search of the data would allow, because the key being searched for is used to directly identify the index (row, or record) in the table that should be returned. For example, suppose one has a hash table designed to allow one to input a name and return a phone number. The hash table uses an algorithm to convert the name to a value of a fixed length that serves as the index for the table. Thus, hashing the key directs you to a specific place in the table to find the desired information.

  When more than one value is assigned to the same key, this is referred to as a collision. While collisions are not desirable, they are common and can be handled in different ways. One way is to have more than one value stored in a list at each index. This is called chaining. Multiple key values can be stored at the same index, and, when one of those keys is entered, it will be compared with the keys at the index until the correct one is found. Another method is called open addressing. In open addressing, when a collision occurs, one key is moved to a different open slot in the hash table based on a particular search algorithm.

  With chaining, many keys can be divided among the indices. A key and its associated date can be deleted in the same way. Hashing can be effective at dividing up a large number of keys so that searches and other operations on even very large amounts of data go quickly.

  A well-designed hash table can have a time complexity of O(1), or constant time, meaning that the same number of operations will be required to perform the search regardless of how many keys are in the table.

Comments
Welcome to zpostcode comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Recommend >
Strange Fruit
     lynching Thomas Shipp and Abram Smith were lynched in Marion, Indiana, on August 7, 1930. (more) Strange Fruit song by Meeropol Actions Cite verifiedCite While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Select Citation Style MLA...
Theranos, Inc.
     Elizabeth Holmes with Theranos's miniature blood vial Holmes claimed to have revolutionized the processes of blood testing by inventing a device that could conduct multiple tests on just a single drop of blood. The process, however, was soon exposed to be an elaborate ruse. (more) Theranos, Inc. American company Actions Share Share Share to social media Facebook X URL...
Sunshine Skyway Bridge
     Tampa Bay, Florida: Sunshine Skyway Bridge The Sunshine Skyway Bridge spans the southern end of Tampa Bay, western Florida. (more) Sunshine Skyway Bridge bridge, Tampa Bay, Florida, United States Actions Share Share Share to social media Facebook X URL https://www.britannica.com/place/Sunshine-Skyway-Bridge Share Share Share to social media Facebook X URL https://www.britannica.com/place/Sunshine-Skyway-Bridge Also known as: Bob Graham Sunshine Skyway Bridge Written...
pronoun
  pronoun grammar Actions Share Share Share to social media Facebook X URL https://www.britannica.com/topic/pronoun Share Share Share to social media Facebook X URL https://www.britannica.com/topic/pronoun Written by Teagan Wolter Teagan Wolter is Associate Editor of Anthropology at Encyclopædia Britannica. Teagan Wolter Fact-checked by The Editors of Encyclopaedia Britannica Encyclopaedia Britannica's editors oversee subject areas in which they have extensive knowledge, whether from...
Information Recommendation
Victor Ambros
     Cowinner of the 2024 Nobel Prize for Physiology or Medicine Victor Ambros Victor Ambros contributed to the discovery of microRNA, which had significant impacts on scientific understanding of cell function and mechanisms underlying gene activity and disease. (more) Victor Ambros American developmental biologist and molecular geneticist Actions Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Victor-Ambros Share Share...
Shigeru Ishiba
     Shigeru Ishiba Defense expert Shigeru Ishiba became Japan's 102nd prime minister in October 2024. (more) Shigeru Ishiba prime minister of Japan Actions Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Shigeru-Ishiba Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Shigeru-Ishiba Written by Ethan Teekah Ethan Teekah is an Assistant Editor for Encyclopædia Britannica. He covers topics primarily...
Hurricane Helene
     Hurricane Helene The aftermath of Hurricane Helene's wind and storm surge after making landfall near Horseshoe Beach, Florida, on September 26, 2024. (more) Hurricane Helene storm [2024] Actions Share Share Share to social media Facebook X URL https://www.britannica.com/event/Hurricane-Helen Share Share Share to social media Facebook X URL https://www.britannica.com/event/Hurricane-Helen Written by John P. Rafferty John P. Rafferty writes about Earth...
Federal Emergency Management Agency
     Hurricane Katrina: National Guard The National Guard searching for survivors in New Orleans after Hurricane Katrina in August 2005. FEMA's response to the disaster led to changes in the agency. (more) Federal Emergency Management Agency United States government agency Actions Share Share Share to social media Facebook X URL https://www.britannica.com/topic/Federal-Emergency-Management-Agency Share Share Share to social media Facebook X URL...
Glen Powell
     Glen Powell American actor Glen Powell attending the Los Angeles premiere of Twisters, the stand-alone sequel to 1996's Twister, 2024. (more) Glen Powell American actor Actions Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Glen-Powell Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Glen-Powell Also known as: Glen Thomas Powell, Jr. Written by Laura Payne Laura Payne...
Austerlitz
     W.G. Sebald W.G. Sebald, author of Austerlitz (2001), 1999. (more) Austerlitz novel by Sebald Actions Share Share Share to social media Facebook X URL https://www.britannica.com/topic/Austerlitz-novel-by-Sebald Share Share Share to social media Facebook X URL https://www.britannica.com/topic/Austerlitz-novel-by-Sebald Written by Peter Boxall Dr. Peter Boxall is a Senior Lecturer in English literature at the University of Sussex. He has published widely on...
Jalen Brunson
     Jalen Brunson NBA player Jalen Brunson taking a jump shot, 2024. (more) Jalen Brunson American basketball player Actions Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Jalen-Brunson Share Share Share to social media Facebook X URL https://www.britannica.com/biography/Jalen-Brunson Also known as: Jalen Marquis Brunson Written by Laura Payne Laura Payne is a freelance writer whose work covers many topics....
Mount Ruang
     Mount Ruang The volcano's summit stands 2,378 feet (725 meters) above sea level. (more) Mount Ruang volcano, Indonesia Actions Share Share Share to social media Facebook X URL https://www.britannica.com/place/Mount-Ruang Share Share Share to social media Facebook X URL https://www.britannica.com/place/Mount-Ruang Written by Laura Payne Laura Payne is a freelance writer whose work covers many topics. She is a former Wayne...