8.0 Map

map 是一種特殊的數據結構:一種元素對(pair)的無序集合,pair 的一個元素是 key,對應的另一個元素是 value,所以這個結構也稱爲關聯數組或字典。這是一種快速尋找值的理想結構:給定 key,對應的 value 可以迅速定位。

map 這種數據結構在其他編程語言中也稱爲字典(Python)、hash 和 HashTable 等。

鏈接

results matching ""

    No results matching ""