← 回題庫

卷別

資料結構及演算法

選擇

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

考科演算法

(4%) Which of the following statements concerning time complexity is false?

  • (A)
    The time complexity of rotation operation of an AVL tree of size nn is O(log⁡n)O(\log n).
  • (B)
    The worst-case time complexity of merge sort is O(nlog⁡n)O(n\log n).
  • (C)
    The time complexity of KMP algorithm to search for a pattern of length mm in a text of length nn is O(n+m)O(n+m).
  • (D)
    The time complexity of the dynamic programming approach to find the longest common subsequence between two sequences of length nn and mm is O(n×m)O(n \times m).

標準解析

AI 已複查