← 回題庫

卷別

資料結構及演算法

選擇

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

(4%) Let nn an mm be the sizes of two sets, assume n<mn < m, if the sets are implemented using sorted lists, what is the time complexity to find the intersection of the two sets?

  • (A)
    O(n+m)O(n+m)
  • (B)
    O(n×m)O(n \times m)
  • (C)
    O(nlog⁡m)O(n\log m)
  • (D)
    O(mlog⁡n)O(m\log n)
  • (E)
    O(log⁡n×log⁡m)O(\log n \times \log m)

標準解析

AI 已複查