Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations?
A. 90 and 99
B. 90 and 100
C. 89 and 94
D. 94 and 99
Answer:A
Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations?
A. 90 and 99 B. 90 and 100 C. 89 and 94 D. 94 and 99
Explanation: Trace the input with the binary search iterative code.