gracekrcx / weekly-notes

4 stars 0 forks source link

Hash Table 是什麼? #131

Open gracekrcx opened 2 years ago

gracekrcx commented 2 years ago

Hash Table 是什麼?

Hash Table 是一種資料結構(不重複值的資料結構)

Hash Table 特點?

hash function。Hash Table 因為有 hash function 的關係,可以透過計算知道傳入的資料,是否已經儲存在 table 裡了。

也是透過 two-sum 的解法初步認識 Hash Table 這個資料結構

What is difference between a dictionary and a hash table?

https://stackoverflow.com/a/2061406

參考文章 白話的 Hash Table 簡介 用 JavaScript 學習資料結構和演算法:字典(Dictionary)和雜湊表(Hash Table)篇

gracekrcx commented 2 years ago

Introduction to Hash Tables and Dictionaries (Data Structures & Algorithms #13)

  1. explain what a dictionary is
  2. and then explain how it can be implemented using a hash table
  3. in a dictionary can define a few more operations, one is insert or delete, ideally all of these operations take O(1) in time on average.
  4. 解決 collision 的方法