Hash table and Python dictionary

Source: Internet
Author: User

One of the most useful Python collections are the dictionary, which is a associative data type where you can store Key-dat A pairs. It is implemented using hash tables.

Hash Table is a collection of items which be stored in such a by-make it easy to find item. Each position of the hash table, often called a slots, can hold an item and are named by an integer value starting At 0. The mapping between an item and the slot where this item belongs in the hash table is called the hash function. A perfect hash function maps every items into a unique slot. When both items hash to the same slot, collision happens. and a systematic method, which called collision resolution, for placing the second item in the hash table must be put FORW Ard.

Hash table and Python dictionary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.