Dictionary = Hash?

后端 未结 4 2015
我在风中等你
我在风中等你 2021-02-04 04:10

Is a dictionary basically just a hash table?

Also bonus: In the Ruby code \"Hash.new {0}\" what is the \"{0}\" at the end for?

4条回答
  •  广开言路
    2021-02-04 04:49

    A dictionary just maps a key to a value. There are many ways to achieve this; a hash-table is one of them.

提交回复
热议问题