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.
答案:登入後查看
統計: A(0), B(0), C(1), D(2), E(0) #3808128
統計: A(0), B(0), C(1), D(2), E(0) #3808128