← 回題庫

卷別

資料結構與演算法

選擇

國立中興大學 2025 · 考試 · 第 6 題

考科演算法

(3 points) Given the text T=T = "abcdefg" and the pattern P=P = "bcd", which algorithm would use hashing to compute the index of the first match efficiently?

  • (A)
    Knuth-Morris-Pratt Algorithm
  • (B)
    Boyer-Moore Algorithm
  • (C)
    Naive String Matching Algorithm
  • (D)
    Rabin-Karp Algorithm

標準解析

AI 已複查