← 回題庫

卷別

資料結構與演算法(A)

選擇

國立臺灣大學 2021 · 考試 · 第 1 題

考科演算法

(5 points) When CAN the worst case of Quicksort occur?

  • C1C_1: Quick Sort where leftmost (or rightmost) element is always chosen as pivot
  • C2C_2: leftmost element is chosen as pivot and array is already sorted in SAME order
  • C3C_3: leftmost element is chosen as pivot and array is already sorted in REVERSE order
  • (A)
    C1C_1
  • (B)
    C2C_2
  • (C)
    C1C_1 and C2C_2
  • (D)
    C2C_2 and C3C_3

標準解析

AI 已複查