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

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -