python - What is the true difference between a dictionary and a hash table? -


i've used dictionaries. write in python.

a dictionary general concept maps keys values. there many ways implement such mapping.

a hashtable specific way implement dictionary.

besides hashtables, common way implement dictionaries red-black trees.

each method has it's own pros , cons. red-black tree can perform lookup in o(log n). hashtable can perform lookup in o(1) time although can degrade o(n) depending on input.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -