InterviewSolution
Saved Bookmarks
| 1. |
Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found?(a) 1(b) 3(c) 4(d) 2I had been asked this question during an interview.My question is taken from Binary Search Iterative in section Searching of Data Structures & Algorithms II |
|
Answer» RIGHT OPTION is (d) 2 For explanation: Iteration1 : mid = 77; Iteration2 : mid = 88; |
|