← 回題庫

卷別

資料結構與演算法(A)

選擇

國立臺灣大學 2022 · 考試 · 第 7 題

(5 points) In a max-heap stored in an array, after these 6 numbers have been inserted in this exact sequence: 5,4,2,6,1,35, 4, 2, 6, 1, 3, what is the value of the node at index 2 (with the root being the node at index 1)?

  • (A)
    1
  • (B)
    2
  • (C)
    4
  • (D)
    5
  • (E)
    none of the other choices

標準解析

AI 生成