哈希集、哈希映射和哈希表?
Hash-sets, Hash-maps and Hash-tables?
Hash-map和Hash-table完全一样吗?基于此what is the difference between hash map, hash set, hash dictionary?,是。
此外,哈希集意味着唯一的元素,但是键在哪一边?
如果它使答案更容易,c++ 可以发挥作用...
HashMap
与 HashTable
具有大致相同的功能,因为它是键值的关联存储。主要区别在于 HashTable
是同步的,并且在任何一侧都不允许 null
,而 HashMap
不是同步的,并且在两侧都允许 null
。
Hash-set implies unique elements, but in which side, the keys?
然而,HashSet
是一个完全不同的集合 - 它只有一面,即钥匙。您可以将其视为没有关联值或所有关联值都相同的 HashMap
。类似于C++的std::unordered_set<T>
of C++, except for the way the generic behavior is implemented. HashMap
, on the other hand, is similar to std::unordered_map<K,V>
。
Hash-map和Hash-table完全一样吗?基于此what is the difference between hash map, hash set, hash dictionary?,是。
此外,哈希集意味着唯一的元素,但是键在哪一边?
如果它使答案更容易,c++ 可以发挥作用...
HashMap
与 HashTable
具有大致相同的功能,因为它是键值的关联存储。主要区别在于 HashTable
是同步的,并且在任何一侧都不允许 null
,而 HashMap
不是同步的,并且在两侧都允许 null
。
然而,Hash-set implies unique elements, but in which side, the keys?
HashSet
是一个完全不同的集合 - 它只有一面,即钥匙。您可以将其视为没有关联值或所有关联值都相同的 HashMap
。类似于C++的std::unordered_set<T>
of C++, except for the way the generic behavior is implemented. HashMap
, on the other hand, is similar to std::unordered_map<K,V>
。