阿摩線上測驗 登入

試題詳解

試卷:114年 - 114 學士後醫學系招生考試試題:計算機概論與程式設計#137105 | 科目:【阿摩】未分類題庫

試卷資訊

試卷名稱:114年 - 114 學士後醫學系招生考試試題:計算機概論與程式設計#137105

年份:114年

科目:【阿摩】未分類題庫

21. Consider the following binary search program written in Python. Please select the CORRECT statement when the input array arr contains exactly 10 numbers.

(A) When all the numbers in arr are the same, it will return 0.
(B) When the key is greater than max(arr), it will return 10.
(C) When the key is greater than max(arr), it will return 11.
(D) It is applicable to a monotonically increasing sequence.

(E) If you forget to sort arr first, it will return -1 regardless of the key.

正確答案:登入後查看