← 回題庫

卷別

資料結構及演算法

選擇

國立政治大學 2025 · 考試 · 第 4 題

(4%) Which of the following statement concerning hashing is false?

  • (A)
    While hash function is designed based on arithmetic operation, hashing is also suitable for strings.
  • (B)
    If there is no collision, the worst time complexity for searching an element in a hash table is O(1)O(1).
  • (C)
    A good hash function should produce the same hash value for similar keys.
  • (D)
    Hashing is typically used for symbol tables in compilers.
  • (E)
    The size of the hash table should ideally be a prime number to reduce the likelihood of collisions.

標準解析

AI 已複查